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 254963

Summary: NullPointerException at com.sun.tools.javac.main.JavaCompiler.resolveIdent
Product: java Reporter: Alexandr Scherbatiy <sunflower>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: jiriprox, stezeb
Priority: P2 Keywords: JDK_9, NO81
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 219650
Attachments: stacktrace
stacktrace
stacktrace
stacktrace

Description Alexandr Scherbatiy 2015-09-03 10:27:46 UTC
Build: NetBeans Dev JDK9 branch (Build 201509030404)
VM: Java HotSpot(TM) Client VM, 1.9.0-ea-b80, Java(TM) SE Runtime Environment, 1.9.0-ea-b80
OS: Windows 7

User Comments:
sunflower: open a project




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.main.JavaCompiler.resolveIdent(JavaCompiler.java:765)
   at com.sun.tools.javac.main.JavaCompiler.resolveIdent(JavaCompiler.java:740)
   at com.sun.tools.javac.model.JavacElements.binaryNameToClassSymbol(JavacElements.java:132)
   at com.sun.tools.javac.model.JavacElements.getTypeElementByBinaryName(JavacElements.java:123)
   at org.netbeans.api.java.source.SourceUtils$4.run(SourceUtils.java:913)
   at org.netbeans.api.java.source.SourceUtils$4.run(SourceUtils.java:908)
Comment 1 Alexandr Scherbatiy 2015-09-03 10:27:48 UTC
Created attachment 155853 [details]
stacktrace
Comment 2 Stepan Zebra 2015-09-17 13:35:30 UTC
Created attachment 156249 [details]
stacktrace

Attempting tu Run a freshly created Maven Java project on following configuration:

Product Version: NetBeans Dev JDK9 branch (Build 20150915-63db74ce1bef)
Java: 1.9.0-ea; Java HotSpot(TM) 64-Bit Server VM 1.9.0-ea-jigsaw-nightly-h3391-20150915-b81
Runtime: Java(TM) SE Runtime Environment 1.9.0-ea-jigsaw-nightly-h3391-20150915-b81
System: Linux version 2.6.32-504.16.2.el6.x86_64 running on amd64; UTF-8; en_US (nb)
Comment 3 Stepan Zebra 2015-09-17 13:49:52 UTC
(In reply to Stepan Zebra from comment #2)
> Created attachment 156249 [details]
> stacktrace
> 
> Attempting tu Run a freshly created Maven Java project on following
> configuration:
> 
> Product Version: NetBeans Dev JDK9 branch (Build 20150915-63db74ce1bef)
> Java: 1.9.0-ea; Java HotSpot(TM) 64-Bit Server VM
> 1.9.0-ea-jigsaw-nightly-h3391-20150915-b81
> Runtime: Java(TM) SE Runtime Environment
> 1.9.0-ea-jigsaw-nightly-h3391-20150915-b81
> System: Linux version 2.6.32-504.16.2.el6.x86_64 running on amd64; UTF-8;
> en_US (nb)

Actually, it happens before the Run itself, when a dialog for selecting a Main class shows up. It fails to list available classes and gets stuck with Initializing... message.
Comment 4 Jiri Prox 2015-09-18 21:02:49 UTC
Created attachment 156288 [details]
stacktrace

NPE when selecting class file in the project view (under Libraries node)
Comment 5 Jiri Prox 2015-09-18 22:02:49 UTC
Created attachment 156290 [details]
stacktrace

NPE when searchig for class usages ( WordLibrary from AnagramGame project)
Comment 6 Jiri Prox 2015-09-18 22:48:50 UTC
This makes Find Usages unusable
Comment 7 Dusan Balek 2016-04-11 14:22:46 UTC
Should be fixed in the current jdk9 build.

http://hg.netbeans.org/main/nb-javac-jdk9/rev/8de754b91513
Comment 8 Quality Engineering 2016-10-11 01:58:16 UTC
Integrated into 'main-silver', will be available in build *201610110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3d644deac689
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #254963 - NullPointerException at com.sun.tools.javac.main.JavaCompiler.resolveIdent - fixed.