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.

Bug 205634 - UnsupportedOperationException at java.util.AbstractMap.put
Summary: UnsupportedOperationException at java.util.AbstractMap.put
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 08:48 UTC by Exceptions Reporter
Modified: 2012-01-06 09:36 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182710


Attachments
stacktrace (536 bytes, text/plain)
2011-11-29 08:48 UTC, Exceptions Reporter
Details
stacktrace (536 bytes, text/plain)
2011-11-29 09:55 UTC, Erno Mononen
Details
stacktrace (536 bytes, text/plain)
2012-01-02 16:37 UTC, Marian Petras
Details
Binary patch attempting to workaround the bug (for NetBeans 7.1) (14.16 KB, application/java-archive)
2012-01-05 20:44 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2011-11-29 08:48:52 UTC
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)
Comment 1 Exceptions Reporter 2011-11-29 08:48:54 UTC
Created attachment 113602 [details]
stacktrace
Comment 2 Erno Mononen 2011-11-29 09:55:42 UTC
Created attachment 113606 [details]
stacktrace

Added a new plugin config to pom.xml and tried to build the project
Comment 3 Exceptions Reporter 2011-12-05 19:09:53 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=182710
Comment 4 Exceptions Reporter 2011-12-21 12:46:01 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=182710
Comment 5 Marian Petras 2012-01-02 16:37:01 UTC
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.
Comment 6 Marian Petras 2012-01-05 10:09:13 UTC
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.
Comment 7 Jan Lahoda 2012-01-05 10:39:02 UTC
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.
Comment 8 Tomas Zezula 2012-01-05 10:51:35 UTC
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?
Comment 9 rdion 2012-01-05 11:06:06 UTC
(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.
Comment 10 Marian Petras 2012-01-05 11:25:56 UTC
It is a bug of the ZeroTurnaround's NetBeans plugin for JRebel.

See http://zeroturnaround.com/forum/topic.php?id=1621
Comment 11 Tomas Zezula 2012-01-05 12:45:10 UTC
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
Comment 12 Jan Lahoda 2012-01-05 20:44:42 UTC
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.
Comment 13 Marian Petras 2012-01-06 09:36:34 UTC
Thanks for the patch. It works!