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 200406101800 How to reproduce: 1) Create new WebApp project (J2SE works fine) 2) Create new J2SE library 3) Add dependepcy of WebApp of the Library more detailed: a) select WebApp project -> context menu -> Properties b) Build|Compiling Sources|Add Project c) Browse the created library 4) EXCEPTION java.lang.NullPointerException - see attachment #1 [details] 5) Close library project 6) select WebApp project -> context menu -> Open Required Projects 7) EXCEPTION java.lang.RuntimeException - see attachment #2 [details] 8) Copy some sources to both projects 9) Compile them - OK 10) Invoke any code completion (even on java libraries) 11) EXCEPTION org.netbeans.mdr.persistence.StorageBadRequestException - see attachment #3 [details] Setting to P1 because no any chance how to work with real projects (using code completion etc.)
Created attachment 15655 [details] java.lang.NullPointerException
Created attachment 15656 [details] java.lang.RuntimeException
Probably a bug in refactoring code, but assigning to web apps for initial evaluation to see if this is reproducible etc.
On my build (co from cvs and built myself today) I can reproduce the first EX but does not seem to do any harm. Even w/o compilation code completion in web app offers a class I created in java library. Does not look like anything in web apps. Refactoring please evaluate and probably downgrade to P2 or P3.
Created attachment 15675 [details] org.netbeans.mdr.persistence.StorageBadRequestException
Similar stacktrace is in Issue 44907 java.lang.NullPointerException org.netbeans.modules.javacore.JMManager.cleanUpCodebases(JMManager.java:675) org.netbeans.modules.javacore.JMManager.access$200(JMManager.java:59)
*** Issue 44907 has been marked as a duplicate of this issue. ***
First NPE is 100% reproducible [build from CVS 20040616]. (JMManager.java:675) Evaluation: 1. this.classPath.getRoots returns null (which would never happen, according to javadoc in ClassPath.getRoots) 2. roots.length causes the exception Questions to ask: Q1: Why cleanUpCodebases is called at all, if we are adding a library Q2: Why ClassPath.getRoots returns null
This is due to a race condition in the ClassPath implementation. Reassigning to Tomas Zezula...
Checking in ClassPath.java; /cvs/java/api/src/org/netbeans/api/java/classpath/ClassPath.java,v <-- ClassPath.java new revision: 1.21; previous revision: 1.20 done
It works now. No NPE.
Verified.