Community
Participate
Working Groups
Steps to reproduce: 1. File -> New -> (Other)-> JPA Project. 2. Enter project name. 3. In section "Target runtime" create new runtime environment and use it. 4.In the configuration section, click on button "Modify" and select "OSGI Bundle" from the "Project facet" list. 5. Go back to the New JPA Project page. 6. Click on Finish. A new JPA project has been created. The target platform associated with the chosen runtime is not active. Also there should be JPA Content node in the project explorer view, under which there is a persistence.xml item. 7. Go to Window->Preferences, Target Platform and activate it. Expected: The JPA project view should not be changed. Actual: The item persistence.xml initially located under JPA Content node dissapeared.
Vladi, could you check if the workaround for bug 352121 works for this one too?
Yes, selecting Project->Clean... makes things a little bit better. As a result the presitence.xml appears, but theere is an validation error: "The persistence.xml file does not have recognized content" If I do Project -> Clean.. again and voala the xml file is there and there and the error disappears. A similar workaround is to do twice right click on the project -> Validate. An easier workaround is to close and open the project.
I'm moving this bug to Dali, because I think the problem is in Dali - not in Libra. Although I'm not sure, I think that there is some synchronization problem related to updating the JPA project model. I've made some experiments. In the method: private JobCommand buildUpdateJobCommand(final JpaProject jpaProject) of class: org.eclipse.jpt.jpa.core.GenericJpaProjectManager I've replaced 'jpaProject.update(monitor)' with 'jpaProject.updateAndWait()' It seems to work (to some extent). With that change the JPA project model already is being updated properly (in the scenario described above) altough I get some errors in the log when I'm changing the target platforms for the first time. Obviously, this is not the correct approach and I'm not familiar enough with the synchronizations in the JPA model, so please someone give me some hints/info how to handle the synchronization problem here.
Created attachment 204745 [details] patch for both HEAD and R3_0_maintenance branches This is a patch implementing what I describe in comment #3. It could be used as a "go on" point for investigation.
We have made some large changes in Juno with regard to how project building/sync, which may have resolved this issue. It would be great if someone could try this out with the latest Dali Juno M7 code and report their findings.
Comment on attachment 204745 [details] patch for both HEAD and R3_0_maintenance branches Attached patch would now be obsolete with new Dali code.
Downgrading severity as no one has shown much interest in this bug in a while.