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 155233 - NullPointerException at org.netbeans.api.java.classpath.ClassPath.entries
Summary: NullPointerException at org.netbeans.api.java.classpath.ClassPath.entries
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL: http://statistics.netbeans.org/except...
Keywords:
: 159047 161415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-11 14:22 UTC by fedesaravia
Modified: 2009-11-04 15:31 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 142579


Attachments
stacktrace (1.21 KB, text/plain)
2008-12-11 14:23 UTC, fedesaravia
Details
stacktrace (1.32 KB, text/plain)
2009-03-04 14:32 UTC, Oleg Khokhlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fedesaravia 2008-12-11 14:22:56 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows Vista, 6.0, x86

User Comments:
fedesaravia: I just oppened the IDE, don't know where the exact problem is since I have lots of opened projects

fedesaravia: I just oppened the IDE, don't know where the exact problem is since I have lots of opened projects



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:297)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:1354)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:1300)
        at org.netbeans.modules.java.source.usages.ClassIndexManager.writeLock(ClassIndexManager.java:99)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:1297)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:1257)
Comment 1 fedesaravia 2008-12-11 14:23:07 UTC
Created attachment 74855 [details]
stacktrace
Comment 2 Exceptions Reporter 2008-12-18 03:50:59 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=142579
Comment 3 Rastislav Komara 2009-02-03 10:55:23 UTC
Overtake.
Comment 4 Oleg Khokhlov 2009-03-04 14:32:07 UTC
Build: NetBeans IDE Dev (Build 200903040201)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows XP, 5.1, x86

User Comments: 
tried to close j2se project during scanning

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:297)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:1397)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker$1.run(RepositoryUpdater.java:1339)
        at org.netbeans.modules.java.source.usages.ClassIndexManager.writeLock(ClassIndexManager.java:99)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:1339)
        at org.netbeans.modules.java.source.usages.RepositoryUpdater$CompileWorker.run(RepositoryUpdater.java:1297)
Comment 5 Oleg Khokhlov 2009-03-04 14:32:11 UTC
Created attachment 77718 [details]
stacktrace
Comment 6 Exceptions Reporter 2009-04-01 05:05:49 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=142579
Comment 7 Rastislav Komara 2009-04-01 12:14:43 UTC
Cannot reproduce, please provide more information: project, userdir, anything of any importance. Thank you.
Comment 8 Tomas Zezula 2009-04-03 08:12:40 UTC
*** Issue 161415 has been marked as a duplicate of this issue. ***
Comment 9 Tomas Zezula 2009-04-03 08:16:26 UTC
I've found the case when the SPI impl violates the contract and passes invalid null value. It's a obvious race condition in SPImpl, I will fix it.
Hopefully it's the only case.
Comment 10 Marian Mirilovic 2009-04-23 10:32:25 UTC
> I've found the case when the SPI impl violates the contract and passes invalid null value. It's a obvious race 
> condition in SPImpl, I will fix it. Hopefully it's the only case.
.. so removing INCOMPLETE keyword
Comment 11 Tomas Zezula 2009-04-23 10:34:47 UTC
To Marian: The INCOMPLETE is still valid s it's not the only one.
Sorry
Comment 12 Marian Mirilovic 2009-04-23 12:13:11 UTC
Tomas: thanks for taking care, does it mean that case mentioned by you is already fixed ?
Comment 13 Tomas Zezula 2009-04-23 12:21:39 UTC
Yes, but there are another possible ways how this may happen. I've added logging and waiting for input.
Comment 14 Tomas Zezula 2009-05-13 14:44:17 UTC
Fixed jet-main: 8768b20a6513
I've did a search through all classes implementing ClassPathImplementation and did fixes of race conditions which may cause this problem.
Hopefully there are not more of these.
Comment 15 Jan Jancura 2009-11-04 15:31:06 UTC
*** Issue 159047 has been marked as a duplicate of this issue. ***