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 186523 - NullPointerException at org.netbeans.api.debugger.ActionsManager.registerActionsProviders
Summary: NullPointerException at org.netbeans.api.debugger.ActionsManager.registerActi...
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 188108 189441 189539 189864 190261 190711 214354 217241 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-21 16:29 UTC by jcampbell
Modified: 2012-08-23 08:41 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 155068


Attachments
stacktrace (1.27 KB, text/plain)
2010-05-21 16:29 UTC, jcampbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcampbell 2010-05-21 16:29:03 UTC
Build: NetBeans IDE Dev (Build 201005182201)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
GUEST: abiendo el ide

jcampbell: Debug a file

GUEST: starting up




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.api.debugger.ActionsManager.registerActionsProviders(ActionsManager.java:428)
   at org.netbeans.api.debugger.ActionsManager.initActionImpls(ActionsManager.java:446)
   at org.netbeans.api.debugger.ActionsManager.isEnabled(ActionsManager.java:260)
   at org.netbeans.modules.debugger.ui.actions.DebuggerAction.isEnabled(DebuggerAction.java:127)
   at org.netbeans.modules.debugger.ui.actions.DebuggerAction.access$000(DebuggerAction.java:73)
   at org.netbeans.modules.debugger.ui.actions.DebuggerAction$Listener.propertyChange(DebuggerAction.java:374)
Comment 1 jcampbell 2010-05-21 16:29:06 UTC
Created attachment 99324 [details]
stacktrace
Comment 2 Martin Entlicher 2010-05-21 18:27:33 UTC
The original cause is:
java.lang.IllegalArgumentException: file:/home/jcampbell/.m2/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1-sources.jar is not a valid classpath entry; use a jar-protocol URL.
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:90)
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.verify(SimplePathResourceImplementation.java:65)
	at org.netbeans.modules.java.classpath.SimplePathResourceImplementation.<init>(SimplePathResourceImplementation.java:108)
	at org.netbeans.spi.java.classpath.support.ClassPathSupport.createResource(ClassPathSupport.java:78)
	at org.netbeans.spi.java.classpath.support.ClassPathSupport.createClassPath(ClassPathSupport.java:128)
	at org.netbeans.modules.debugger.jpda.projects.SourcePathProviderImpl.createClassPath(SourcePathProviderImpl.java:1233)
	at org.netbeans.modules.debugger.jpda.projects.SourcePathProviderImpl.<init>(SourcePathProviderImpl.java:186)

I was able to reproduce this with an empty jar file (file of 0 length)
Is it the case of /home/jcampbell/.m2/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1-sources.jar file?
Comment 3 jcampbell 2010-05-24 14:24:09 UTC
The file was not empty and I was able to open the jar file and see the contents (The file seems just fine).  I did go ahead and DELETE the file and then recompile my Maven project (which re-downloads the file), then reopen NetBeans 6.9.... and it appears that debugging a file is working again.

I have seen this happen before.... I don't know what causes it, but I switch back and forth between NetBeans 6.8 and 6.9-dev, and it is during that time that I see the problem.

If I can somehow reproduce the problem, I will report back.
Comment 4 Martin Entlicher 2010-05-25 14:45:49 UTC
Fixed in changeset:   172004:e402548e2e5d
http://hg.netbeans.org/main/rev/e402548e2e5d
Whatever the problem was, after this change it will print a warning into messages.log file and ignore the invalid source root.
Comment 5 Quality Engineering 2010-05-26 07:18:49 UTC
Integrated into 'main-golden', will be available in build *201005260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e402548e2e5d
User: mentlicher@netbeans.org
Log: #186523 - Safe creation of classpath, catch IllegalArgumentException that can be thrown when source root is not valid.
Comment 6 gigadot 2010-06-04 22:29:58 UTC
I believe that the cause of the problem is that Netbeans .9 RC2 reads the invalid java sources in local maven repository. For some reason, many of my java source codes in in local maven repository contain html contents of error page 404 instaed of zip content. Somehow, the exception is thrown when it cannot read the invalid maven source codes and propagate tot he debugger.

Once all the invalid *-source.jar files are deleted from local maven repository. I can start debugger without any problem. So I think the exception should be caught and ignored for the invalid sources. Hopefully this information can help to fix the problem.
Comment 7 Martin Entlicher 2010-06-27 09:16:31 UTC
*** Bug 188108 has been marked as a duplicate of this bug. ***
Comment 8 mexer 2010-06-28 20:47:41 UTC
the debbuger start working when i removed the itextpdf 5.0.2 dependency, before that,  i could clean, build and run the project. Then y modify the pom file as:

        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
            <version>5.0.2</version>
            <type>jar</type>
            <exclusions>
                <exclusion>
                    <artifactId>bcmail-jdk14</artifactId>
                    <groupId>org.bouncycastle</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>bcprov-jdk14</artifactId>
                    <groupId>org.bouncycastle</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>bctsp-jdk14</artifactId>
                    <groupId>org.bouncycastle</groupId>
                </exclusion>
            </exclusions>
        </dependency>

bctsp-jdk14, bcprov-jdk14, bcmail-jdk14 are compile dependencies. After that, everything works like a charm
Comment 9 Martin Entlicher 2010-08-12 14:50:46 UTC
*** Bug 189441 has been marked as a duplicate of this bug. ***
Comment 10 Martin Entlicher 2010-08-16 09:42:54 UTC
*** Bug 189539 has been marked as a duplicate of this bug. ***
Comment 11 Martin Entlicher 2010-08-26 06:46:26 UTC
*** Bug 189864 has been marked as a duplicate of this bug. ***
Comment 12 Martin Entlicher 2010-09-09 11:44:54 UTC
*** Bug 190261 has been marked as a duplicate of this bug. ***
Comment 13 Martin Entlicher 2010-10-06 09:33:19 UTC
*** Bug 190711 has been marked as a duplicate of this bug. ***
Comment 14 Martin Entlicher 2012-06-19 14:26:03 UTC
*** Bug 214354 has been marked as a duplicate of this bug. ***
Comment 15 Martin Entlicher 2012-08-23 08:41:52 UTC
*** Bug 217241 has been marked as a duplicate of this bug. ***