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: NetBeans IDE 7.0.1 (Build 201107282000) VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04 OS: Windows 7 User Comments: GUEST: "Build" a maven project, "Clean and Build" works though ender01: Trying to compile a maven based EJB by hitting F11 with a Test class open. pekarna: Clicking between various Maven project .java files. Clicked the Build icon while on one project's java file, then again on another project's .java file. Stacktrace: java.lang.UnsupportedOperationException at java.util.AbstractMap.put(AbstractMap.java:186) at org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:0) at org.netbeans.modules.maven.cos.CosChecker.cleanGeneratedClassfiles(CosChecker.java:568) at org.netbeans.modules.maven.cos.CosChecker.checkRunConfig(CosChecker.java:153) at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:137) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Created attachment 113602 [details] stacktrace
Created attachment 113606 [details] stacktrace Added a new plugin config to pom.xml and tried to build the project
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=182710
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=182710
Created attachment 114557 [details] stacktrace I added file 'rebel.xml' (JRebel configuration file) to directory WEB-INF/classes of a Maven web application project and then I tried to build it.
This is a blocker in my opinion as this bug makes the IDE unusable for development of web applications. Restart of the IDE does not help - once you get the exception on a project, you cannot build the project any more.
Well, there is no invocation of "put" on j.u.Map in the NetBeans' version of JavaRunner. Looking at the messages.log, I have found this: INFO [org.zeroturnaround.jrebel.netbeans.installer.Patcher]: Patching successful for org.netbeans.api.java.project.runner.JavaRunner So this appears to be a bug outside the NB codebase to me.
The JavaRunner has no call of Map.put. java.lang.UnsupportedOperationException at java.util.AbstractMap.put(AbstractMap.java:186) at org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:0) Don't you use something like jrebel?
(In reply to comment #8) > The JavaRunner has no call of Map.put. > > java.lang.UnsupportedOperationException > at java.util.AbstractMap.put(AbstractMap.java:186) > at > org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:0) > > Don't you use something like jrebel? Yes I do. If it is a problem with JRebel we can close this issue.
It is a bug of the ZeroTurnaround's NetBeans plugin for JRebel. See http://zeroturnaround.com/forum/topic.php?id=1621
Unfortunately there is nothing the Java Project can do with this issue. It has to be fixed in jRebel NB plugin, see Marian's thread http://zeroturnaround.com/forum/topic.php?id=1621
Created attachment 114674 [details] Binary patch attempting to workaround the bug (for NetBeans 7.1) I attempted to create a workaround for the bug. I cannot test it, but I hope it will work. NetBeans 7.1 is required. Save the attached jar into directory: ${NETBEANS_INSTALL}/java/modules/patches/org-netbeans-modules-maven/ (${NETBEANS_INSTALL}/java/modules should exist, patches/org-netbeans-modules-maven/ needs to be created). Then update timestamp of: ${NETBEANS_INSTALL}/java/.lastModified NetBeans should print something like: INFO [org.netbeans.core.startup.NbEvents]: Module patch or custom extension: .../java/modules/patches/org-netbeans-modules-maven/205634.jar If something goes wrong, deleting the patch's jar and updating timestamp for the .lastModified should be sufficient to remove the effects of the patch.
Thanks for the patch. It works!