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

Summary: NullPointerException at org.netbeans.modules.maven.ProjectOpenedHookImpl.projectOpened
Product: projects Reporter: alied <alied>
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aosamai, trekxander
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 208378
Bug Depends on:    
Bug Blocks: 242107    
Attachments: stacktrace
stacktrace

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 ***