Community
Participate
Working Groups
Create a new jpa project and don't specify an implementation library (no persistence.jar on your classpath). Generate some entities from your database and notice all the java compile errors because the javax.persistence classes are not in your classpath. Add the persistene.xml java to your classpath and the project now has no errors. The project should include errors for each java file because they are not listed in the persistence.xml. Doing a project validate or even a clean does not show these errors. If you actually open one of the java files in to the java editor and then validate it, you will get the error. The files are not making it in to our jpa model until they are opened in the editor. You can watch this happening if you expand the JPA content in the project explorer. As you open a java file in the editor, it will appear under your persistence unit.
Candidate for 2.0.1.
This bug is partially dependent on bug 174513. We need to make sure a jpaProject.update() is called when the classpath changes and we also need the JpaValidator called (which is the part bug 174513 would do for us)
Created attachment 105021 [details] proposed patch - HEAD - partial fix The attached patch partially fixes this bug, it makes sure our model is appropriately updated on classpath changes. A project validate will now show the errors. When the blocking bug is fixed the validate will occur automatically when a classpath change occurs
checked in to HEAD