Community
Participate
Working Groups
Build Identifier: 2.1.0 For some reason if I build with dependencies (i.e. mvn install) the parent project before manually building (mvn install) the persistence module the processor will not go, and the build will fail. More details (see Pascal's comments on the issue): http://stackoverflow.com/questions/3458742/why-the-compiler-doesnt-recognize-the-metamodel-attributes/3462375#3462375 I reproduced the problem and here is my analysis. EclipseLink's annotation processor uses the following parameter -Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml to find the persistence.xml using a relative path. When running a reactor build, this relative path is wrong (it points on MemoPlatform/src/main/...) and the persistence.xml isn't found. I tried to use an absolute path (using -Aeclipselink.persistencexml=${basedir}/src/main/resources/META-INF/persistence.xml) but then the annotation processor complains about a non relative path. Reproducible: Always Steps to Reproduce: 1.Checkout code at https://memorizeasy.googlecode.com/svn/branches/processorBug 2. Run mvn install It will fail. Run mvn install on the persistence module only and then again on the whole project and it will work.
The following ended up leaking in my distributed application: java.lang.Error: Unresolved compilation problems: The import com.mysimpatico.memoplatform.persistence.entities.Meaning_ cannot be resolved Meaning_ cannot be resolved to a variable Meaning_ cannot be resolved to a variable at com.mysimpatico.memoplatform.persistence.Database.<init>(Database.java:6) at com.mysimpatico.memoplatform.persistence.MeaningsDatabase.<init>(MeaningsDatabase.java:33) at com.mysimpatico.memoplatform.persistence.ContentProducer.<init>(ContentProducer.java:27) at com.mysimpatico.memoplatform.persistence.ContentProducer.<clinit>(ContentProducer.java:24) at com.mysimpatico.memoplatform.persistence.Installer.checkIfThereIsContent(Installer.java:24) at com.mysimpatico.memoplatform.persistence.Installer.restored(Installer.java:20) at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426) at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366) at org.netbeans.ModuleManager.enable(ModuleManager.java:944) at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318) at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:254) at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:286) at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172) at org.netbeans.core.startup.Main.start(Main.java:302) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:114) at java.lang.Thread.run(Thread.java:637)
moving this bug to JPA. Looks like a preprocessor bug, more than a build issue.
triage for 2.5.1
Any chance you can try a more recent version of EclipseLink? I believe your issue has been addressed in 2.3 with the fix for bug 345808.
Closing as a duplicate of 345808. *** This bug has been marked as a duplicate of bug 345808 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink