Java – persistent error message: an instance of an empty PK was incorrectly provided for the lookup operation
•
Java
I'm trying to use NetBeans 7.01 to learn JSF 2.0 and JPA tutorials I am using Oracle Xe and JDBC_ 6. I used the JSF page from the entity wizard to generate my JSF page Everything is normal because I can retrieve data from the database and display them However, when I try to create or update records in the database, I receive this error:
How did this happen and how should I solve it?
Solution
This basically means that you did the following:
Entity entity = em.find(Entity.class,null);
Please note that PK is empty here To fix your problem, make sure it is not null
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码