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 53443

Summary: Editor crashes always: Cannot open file
Product: java Reporter: bht <bht>
Component: UnsupportedAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker CC: tzezula
Priority: P1    
Version: 4.x   
Hardware: PC   
OS: Windows 95/98   
Issue Type: DEFECT Exception Reporter:

Description bht 2005-01-14 20:41:49 UTC
In my configuration, it looks like it is not
possible to open any Java source file in the editor.

I downloaded the current Q-build and ran it over
my existing NetBeans 4.0 user dir. So I switched
back to 4.0 because I can't use 4.1.

>Log Session: Saturday, January 15, 2005 9:26:21
AM NZDT
>System Info: 
  Product Version       = NetBeans IDE Dev (Build
200501071427)
  Operating System      = Windows 98 version 4.10
running on x86
  Java; VM; Vendor      = 1.4.2_03; Java
HotSpot(TM) Client VM 1.4.2_03-b02; Sun
Microsystems Inc.
...
Annotation: Exception occurred in Request Processor
java.lang.NullPointerException
    at
org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:205)
    at
org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:177)
    at
org.netbeans.modules.javacore.parser.ECRequestDescImpl.getClassPathString(ECRequestDescImpl.java:145)
    at
org.netbeans.modules.javacore.parser.ECRequestDescImpl.<init>(ECRequestDescImpl.java:57)
    at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorList.initCheck(ResourceImpl.java:1319)
    at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorList.size(ResourceImpl.java:1332)
    at
org.netbeans.modules.java.JavaEditor.refreshAnnotations(JavaEditor.java:384)
    at
org.netbeans.modules.java.JavaEditor.access$200(JavaEditor.java:74)
    at
org.netbeans.modules.java.JavaEditor$16.run(JavaEditor.java:1432)
    at org.openide.util.Task.run(Task.java:189)
    at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)
Comment 1 Jan Lahoda 2005-01-14 20:58:13 UTC
Seems like java module problem to me.
Comment 2 ehucka 2005-01-17 10:12:28 UTC
It could be problem with running 4.1 on 4.0 userdir. If you start 4.1
at first time it should find 4.0 userdir at <HOME>/.netbeans and ask
you if you want to import it.
You can try to start IDE on new userdir (or clear the old) and check
if it will fail again.
Comment 3 Martin Matula 2005-01-17 11:07:17 UTC
This seems to be a problem in the classpath API.
Comment 4 Tomas Zezula 2005-01-17 12:55:21 UTC
It is not a problem of ClassPath. The ClassPath was constructed with
ClassPathImplementation which violates ClassPath contract. The
getResources () method returns null.

Who constructed such a ClassPath? ECRequest?

To Reporter: You should add more details. Is the file from project or
is it non project file? If it is a project file, what type of project
is it (j2seproject, project from ant script, web, j2ee)?

I will add an assertion into ClassPath to throw AssertionError rather
than NPE.
Comment 5 Tomas Zezula 2005-01-17 13:58:34 UTC
Checking in src/org/netbeans/api/java/classpath/ClassPath.java;
/cvs/java/api/src/org/netbeans/api/java/classpath/ClassPath.java,v 
<--  ClassPath.java
new revision: 1.30; previous revision: 1.29
done
Processing log script arguments...
More commits to come...
Checking in
src/org/netbeans/spi/java/classpath/ClassPathImplementation.java;
/cvs/java/api/src/org/netbeans/spi/java/classpath/ClassPathImplementation.java,v
 <--  ClassPathImplementation.java
new revision: 1.3; previous revision: 1.2
done
Comment 6 Jiri Prox 2005-07-12 16:53:10 UTC
Verified compatibility NB 4.0 fcs -> NB 4.1 fcs and NB 4.1 fcs -> NB 4.2
(200507110943)
Comment 7 Quality Engineering 2007-09-20 12:06:25 UTC
Reorganization of java component