This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 201004090201 ] [ JDK VERSION : 1.6.* ] I'm getting this error when compiling: error: javax.annotation.processing.FilerException: Attempt to recreate a file for type com.validation.master.core.db.AssigmentType_ Before that I see Notes about metadata creation of classes like this one: Note: Building metadata class for round element: com.validation.master.core.tool.MD5 But also noted that is looking for some weird files, maybe this is why is failing: Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml What I have is the persistence.xml file on the META-INF folder. this used to work before. Just retried in today's build.
Created attachment 96968 [details] Full output for review
As a workaround add a switch -proc:none into javac.compilerargs into project.properties, e.g.javac.compilerargs=-Xlint -Xlint:-serial -proc:none. I use this solution in CRUD Sample too.
Not clear what project type you are using, so reassigning for evaluation.
If you don't need entities metamodel it's easy to turn off ap in project properties, but wonder why eclipselink tries to recreate AssigmentType_, may it be listed in persistence.xml twice?
As it may be an issue in CanonicalModelProcessor it may be good to file an issue at https://bugs.eclipse.org/bugs/
Jiri Do you mean GRUD sample have the same issue?
As I missed it in previos comment. Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml are notes only and are shown insuccesful cases also, most likely compile failed only because of error error: javax.annotation.processing.FilerException: Attempt to recreate a file for type com.validation.master.core.db.AssigmentType_
In my case it was a plain Java project. I was in the process of retrying with a Web project when the work week came to a close. :P Will file the bug as suggested.
Thanks, please add link to el issue if you will file.
Here's the link to the bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=308713
I found one of your projects(VMCore) with AssignmentType and it contain two AssignmentType entities, it's marked with error badge even in editor, so it's reasonable to have some problem from persistence support. If you still want to compile such project it's easy to turn of ap in project properties. Feel free to reopen with your opinion/ more details.
I was able to remove the badges after recreating the Persistence classes. Need to retry tomorrow. It only appear to happen with Eclipselink. Hibernate and Top link doesn't show that issue but I need JPA 2.
I made sure no duplicate entities exist. Even recreating the files got to the same error as before, adding the -proc:none compiler option fixed the issue but it needs further investigation IMO. I noticed that the Eclipselink libraries seem up to date.
can you provide sample project? what build do you use?
do you have the same output without duplicates?
Created attachment 99576 [details] Sample Project I tried with 20100526001 and 6.9 RC1. I get exactly the same output without having duplicates. The sample project has the
*completing previous comment, sorry* javac.compilerargs=-proc:none not enabled. Enabling that makes the project compile perfectly.
ok, I found two reasons and both are eclipselink related - eclipselink do not handle j2se environment properly, and do not work properly without <exclude-unlisted-classes>true</exclude-unlisted-classes>, but it's not main one here as all classes are listed already. - if several pu contain the same entity eclipselink throw this exception and block compilation. in my opinion eclipselink issue can be reopened with these details, as a workaround/fix/solution on nb side if there are more then one pu 1) disable annotation processing (just uncheck checkbox in compile option) 2) specify additional compiler option like "-Aeclipselink.persistenceunits=VMPU" if you want to use metamodel.
Reopened eclipse bug as requested.
There is many ways how to look at this problem. It is perfectly OK to have one persistence file with two units. In given example (attached Sample Project) I would argue though that second PU (TestVMPU) should have been defined in separate persistence file stored under tests folder - it is merely a good practice otherwise TestVMPU will get deployed into production which is not desirable (though harmless). There is not much what EclipseLink can do to prevent this error: the EL annotation processor was instructed to generate metamodel and it is reports error instead of overriding already generated metamodel class which is good thing. Perhaps the EL error message could be more self explanatory to help user realize what's wrong, eg. "Metamodel class yyy.XXX_ already exists and cannot be regenerated. Explanation of the problem is most likely that yyy.XXX class is referenced from more than one PU and annotation processor was executed on both of these PUs. Either process just one PU or configured different output folders for the PUs to avoid filename collision." NetBeans automatically start JPA annotation processor during the build to generate metamodel classes to make user's life easier. That's good thing but perhaps we should be more careful what we do when multiple PUs are available in a project. Perhaps, and I'm just brainstorming here, we should: * have a property explicitly listing PUs to use for metamodel generation; and * store such property in project properties; and * pass value of that property to "-Aeclipselink.persistenceunits=" (considering 'persistenceunits' is plural it means list of units separate by commas can be passesed, right?); and * always automatically enable just first PU and keep other ones disabled; and * (optionally) let user edit this value in visual PU editor (a checkbox at the bottom of each PU section saying "Generate meta model"). That way user can decide which PU to include/exclude. I would aim for simpler rather than more complex solution because it should not happen too often and with better error description on EL side user should be able to figure out how to address it. If we learn that lots of users are impacted then we can try to introduce more complex solution. What do you think?
ok, may be we can add subpackage option by default. but also user can do it himself and control it better.
I understand the TestVMPU comment but still is valid to have multiple persistence units. In my case all PUs are basically duplicates with different database provider targets but this is not always the case. Some times more than one active PU is needed to handle two separate DB's at once or separate parts of the database. Also cases when the PU is decided at run time would be affected by this proposal and/or would present the same scenario. I would like to learn what the user could do as Sergey Petrov states...
Integrated into 'main-golden', will be available in build *201007030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9ac1359a9221 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #183779 - just started
Unable to reproduce in 6.9/6.10 M1
I got same errors in Netbeans 6.10M1: .... Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml
(In reply to comment #25) > I got same errors in Netbeans 6.10M1: > .... > Note: File was not found: META-INF/orm.xml > Note: File was not found: META-INF/eclipselink-orm.xml > Note: File was not found: META-INF/orm.xml > Note: File was not found: META-INF/eclipselink-orm.xml These are only *notes* and not errors. What exactly is your problem please?
More information: 1/ Using NetBeans 6.10 Build 201010040000 2/ project --> Generate Entity Classes from Database 2/ Generate JSF pages from Entity Classes 3/ Run Clean and Build, got errors: .... Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml Note: File was not found: META-INF/orm.xml Note: File was not found: META-INF/eclipselink-orm.xml 4/ Go to browser, clicked on Address link, got error: [EL Info]: 2010-10-04 15:44:02.203--ServerSession(15856458)--EclipseLink, version: Eclipse Persistence Services - 2.1.0.v20100614-r7608 [EL Severe]: 2010-10-04 15:44:02.203--ServerSession(15856458)--Local Exception Stack: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [com.mysql.jdbc.Driver] not found. at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:579) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:380) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:157) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:214) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:202) at jpa.controllers.AddressJpaController.getEntityManager(AddressJpaController.java:31) at jpa.controllers.AddressJpaController.getAddressCount(AddressJpaController.java:126) at jsf.classes.AddressController.getPagingInfo(AddressController.java:40) at sun.reflect.NativeM
Thanks, more comments inlined: (In reply to comment #27) > 3/ Run Clean and Build, got errors: > .... > Note: File was not found: META-INF/orm.xml > Note: File was not found: META-INF/eclipselink-orm.xml > Note: File was not found: META-INF/orm.xml > Note: File was not found: META-INF/eclipselink-orm.xml This is really no harm. Just a FYI note. > 4/ Go to browser, clicked on Address link, got error: > > [EL Info]: 2010-10-04 15:44:02.203--ServerSession(15856458)--EclipseLink, > version: Eclipse Persistence Services - 2.1.0.v20100614-r7608 > [EL Severe]: 2010-10-04 15:44:02.203--ServerSession(15856458)--Local Exception > Stack: > Exception [EclipseLink-4003] (Eclipse Persistence Services - > 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException > Exception Description: Configuration error. Class [com.mysql.jdbc.Driver] not > found. **com.mysql.jdbc.Driver not found** - MySQL driver is missing in runtime. You have to either include it in your web app or should deploy it to server for all your apps.
Got the same issue in a different project in 7.1 (part of NetCat program). Setting javac.compilerargs=-proc:none seems to solve the problem. Should this be handled by the IDE when the eclipse libraries are added, specially the model generator?
I'm not sure why it was closed as worksforme, but as it's said above it's multiple pu case, and unfortunately ide do not handle this case automatically, it's user responsibility to add subfolder properties to persistence.xml in current realization (or disable metamodel creation, you do not need to add "proc:none", there should be checkbox in projects's properties). If I got it right it's something between a defect and enhancement request to generate eclipselink.canonicalmodel.subpackage automatically.
Is there documentation on how to "add subfolder properties to persistence.xml in current realization". Never heard of that before.
you can find sample in eclipselink issue, see comments above also copy to this issue: <persistence-unit name="Bar"> <properties> <property name="eclipselink.canonicalmodel.subpackage" value="one"/> </properties> </persistence-unit> <persistence-unit name="Bar2"> <properties> <property name="eclipselink.canonicalmodel.subpackage" value="two"/> </properties> </persistence-unit> currently it's required to add these properties manually
(In reply to comment #30) > I'm not sure why it was closed as worksforme Me neither. :-) I must got distracted by vinh_truong's last exception. Sorry about that.
*** Bug 202420 has been marked as a duplicate of this bug. ***
*** Bug 210547 has been marked as a duplicate of this bug. ***
fails with compilation, may cause scanning slowness also. as well as automatic subpackage addition, it's nice to mark project/persistence.xml with warning badge to show possible problem with processing of two and more pu without subpackages.
Created attachment 119315 [details] stacktrace Just doing minor edits in the maven module; IDE keeps on restarting scanning. Bogus error badges on MavenSourcesImpl.
Created attachment 129168 [details] stacktrace Various coupling errors and sundry javac exceptions; I just want the IDE to stop trying to rescan my projects, because it does not seem to be able to.
It's unclear why last two reports are added to the issue as the issue have no exception reporter link.
(In reply to comment #2) > As a workaround add a switch -proc:none into javac.compilerargs into > project.properties, e.g.javac.compilerargs=-Xlint -Xlint:-serial -proc:none. I > use this solution in CRUD Sample too. For a Maven project, these settings work too: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <compilerArguments> <endorseddirs>${endorsed.dir}</endorseddirs> <proc:none/> <Xlint/> <Xlint:-path/> <verbose /> </compilerArguments> <showDeprecation>true</showDeprecation> </configuration> </plugin>
This bug already has 50 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=186560
I don't see any 'persistence' traces in latest two reports and in some older also, will try to reset into new issue.
Also it's unclear why exception reporter attach these exception into this issue. #231072 is created instead. return back to last known status before reopening.
(In reply to comment #41) > This bug already has 50 duplicates > see http://statistics.netbeans.org/exceptions/detail.do?id=186560 Weird. Just file a report for "ide/Report Exception" to look into it - looks like something got corrupted.
Very Interesting post. very Nice I am very happy to Read this post.. Thanks Very Interesting post. very Nice I am very happy to Read this post.. Thanks <a href="http://www.mageewp.com">free wordpress themes</a> <a href="http://www.mageewp.com">blog Wordpress themes</a>