Community
Participate
Working Groups
Build Identifier: I20110525-0800 1. Create a brand new JPA project with a mapping xml created along with it (selecting "Create mapping file (orm.xml) checkbox" when creating the JPA project) 2. Right-click the created JPA project and select New -> JPA Entity to create an entity, select "Add to entity mappings in XML" checkbox when it shows, create a couple of fields for the entity, and hit Finish. An error is reported saying An internal error occurred during: "Add entity to XML". java.lang.NullPointerException at org.eclipse.jpt.jpa.ui.internal.wizards.entity.data.operation.NewEntityClassOperation$1.run(NewEntityClassOperation.java:411) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) And you can also see the fields created for the entity in step 2 are not written to the mapping XML at all. Reproducible: Always
The key to reproducing this bug is that you have to make one of the fields an id field.
Created attachment 197767 [details] proposed patch against head This patch changes the JPA project synchronizers to be synchronous when editing the orm.xml file. This allows the model to be fully updated when one change is made before another change is made. This is necessary when changing the model in code.
checked in to HEAD for 3.0.1
Verified in Build I-3.4.0-20110731180834 Verified you can create an entity with an id attribute and add it to the orm.xml mapping file without error. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.1