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 243427 - NullPointerException at org.netbeans.modules.maven.ProjectOpenedHookImpl.projectOpened
Summary: NullPointerException at org.netbeans.modules.maven.ProjectOpenedHookImpl.proj...
Status: RESOLVED DUPLICATE of bug 245785
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks: 242107
  Show dependency tree
 
Reported: 2014-04-01 04:10 UTC by alied
Modified: 2014-07-18 09:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208378


Attachments
stacktrace (787 bytes, text/plain)
2014-04-01 04:10 UTC, alied
Details
stacktrace (787 bytes, text/plain)
2014-07-07 15:10 UTC, aosamai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2014-04-01 04:10:19 UTC
Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132
OS: Linux

User Comments:
GUEST: Startup netbeans, opening netbeans

alied: just opening.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.maven.ProjectOpenedHookImpl.projectOpened(ProjectOpenedHookImpl.java:178)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
   at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1298)
   at org.netbeans.modules.project.ui.OpenProjectList.access$1600(OpenProjectList.java:137)
   at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.loadOnBackground(OpenProjectList.java:516)
   at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:394)
Comment 1 alied 2014-04-01 04:10:21 UTC
Created attachment 146451 [details]
stacktrace
Comment 2 Milos Kleint 2014-04-01 06:57:59 UTC
vvery weird.

the line with NPE can only fail in cpProvider being null.
GlobalPathRegistry.getDefault().register(ClassPath.BOOT, cpProvider.getProjectClassPaths(ClassPath.BOOT));


and that's looked up from the project lookup like this.
ProjectSourcesClassPathProvider cpProvider = proj.getLookup().lookup(ProjectSourcesClassPathProvider.class);

however the implementation is correctly registered via @@ProjectServiceProvider annotation. So I suppose the only point where things can break is the project lookup internal. Either on the construction or lookup side. Very hard to debug given the apparently rare occurrence of the event.
Comment 3 Milos Kleint 2014-04-01 06:58:37 UTC
one report from 1.8 jdk, one from 1.7 jdk.
Comment 4 Exceptions Reporter 2014-05-19 05:39:56 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=208378
Comment 5 aosamai 2014-07-07 15:10:15 UTC
Created attachment 147919 [details]
stacktrace

just simply started netbeans and there were some maven projects being loaded
Comment 6 Tomas Stupka 2014-07-18 09:35:51 UTC

*** This bug has been marked as a duplicate of bug 245785 ***