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.
when generating a JUnit test in an EJB Module project, I get the attached error.
Created attachment 20716 [details] error
See also Issue 56061
This is a bug in junit module (TestCreator class). It passes an Identifier used by other import into a new import. duplicate() method should be used to create a copy of that identifier. Even better you could use duplicate() on the whole import.
*** Issue 56154 has been marked as a duplicate of this issue. ***
i think it is p2
Same thing happens in WebApps.
It works in WebApps with a plain class.
Confirmed, accepted.
The bug is reproducible with a Servlet class, not with a plain Java class.
Immediately before the exception is thrown, an informational exception is printed to the console (in the dev. build). Top few lines of the exception: [org.netbeans.javacore] INFORMATIONAL ***** Exception occurred ***** at 2:30 PM on Mar 11, 2005 [catch]java.lang.Exception: rollback!!! at o.n.m.javacore.ExclusiveMutex.leave(ExclusiveMutex.java:348) at o.n.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:248) at o.n.mdr.handlers.BaseObjectHandler._unlock(BaseObjectHandler.java:225) at o.n.mdr.handlers.ClassProxyHandler._postCreate(ClassProxyHandler:101) at o.n.jmi.javamodel.ImportClass$Impl.createImport(Unknown Source) ...
Created attachment 20784 [details] information exception thrown before CompositionViolationException
Fixed in the trunk. Modified file: junit/src/org/netbeans/modules/junit/TestCreator.java (1.42) Diff: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/TestCreator.java?r1=1.41&r2=1.42&diff_format=u Thanks Martin Matula for a (yet another) hint on how to fix it.
Fixed also in branch QBE200503101100. Modified file: junit/src/org/netbeans/modules/junit/TestCreator.java (1.41.2.1) Diff: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/TestCreator.java?r1=1.41&r2=1.41.2.1&diff_format=u
*** Issue 56294 has been marked as a duplicate of this issue. ***
Verified in 200503131900.
confirmed this is fixed.
Now waiting for commit to qbuild branch.
q-build branch QBE200503101100.
It has been already merged to Q-build branch -- see previous comment from Marian.