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 269849

Summary: NullPointerException at org.netbeans.modules.java.api.common.classpath.ClassPathProviderImpl.getBootClassPath
Product: java Reporter: danilopiazza
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: mbalin
Priority: P1    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 228043
Attachments: stacktrace
stacktrace

Description danilopiazza 2017-02-16 14:45:39 UTC
Build: NetBeans IDE Dev (Build 201702140002)
VM: OpenJDK 64-Bit Server VM, 25.121-b13, OpenJDK Runtime Environment, 1.8.0_121-8u121-b13-0ubuntu1.16.10.2-b13
OS: Linux

User Comments:
danilopiazza: An error occurred while switching Project Groups

GUEST: Opening java project




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.api.common.classpath.ClassPathProviderImpl.getBootClassPath(ClassPathProviderImpl.java:838)
   at org.netbeans.modules.java.api.common.classpath.ClassPathProviderImpl.findClassPath(ClassPathProviderImpl.java:1147)
   at org.netbeans.modules.web.project.classpath.ClassPathProviderImpl.findClassPath(ClassPathProviderImpl.java:231)
   at org.netbeans.spi.java.project.support.ClassPathProviderMerger$ProxyClassPathImplementation.checkProviders(ClassPathProviderMerger.java:176)
   at org.netbeans.spi.java.project.support.ClassPathProviderMerger$ProxyClassPathImplementation.<init>(ClassPathProviderMerger.java:162)
   at org.netbeans.spi.java.project.support.ClassPathProviderMerger$CPProvider.findClassPath(ClassPathProviderMerger.java:112)
Comment 1 danilopiazza 2017-02-16 14:45:41 UTC
Created attachment 163650 [details]
stacktrace
Comment 2 Tomas Zezula 2017-02-16 16:21:23 UTC
Seems a project in CPPImpl is null. The web project probably does not provide it.
The project should be inferred from the AntProjectHelper not passed by the Builder.
I will fix the API to prevent such misuse.
Thanks for report!
Comment 3 Martin Balin 2017-02-17 09:39:24 UTC
Created attachment 163651 [details]
stacktrace

NetBeans build from sources on 2/16/2017. Started on top of JDK9 EA b155 .
Create new Java Web > "Web Application" project based on GF - JDK9 EA b155 is default Java platform for this web project.
After project has been created following exception occurs.
Comment 4 Tomas Zezula 2017-02-17 11:48:19 UTC
Fixed jet-main 863e357f7081
Comment 5 Quality Engineering 2017-02-19 03:47:34 UTC
Integrated into 'main-silver', will be available in build *201702190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/863e357f7081
User: Tomas Zezula <tzezula@netbeans.org>
Log: #269849:NullPointerException at org.netbeans.modules.java.api.common.classpath.ClassPathProviderImpl.getBootClassPath