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 252746 - com.sun.tools.javac.code.Symbol$CompletionFailure: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Summary: com.sun.tools.javac.code.Symbol$CompletionFailure: Fatal Error: Unable to fin...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords: JDK_9
Depends on:
Blocks:
 
Reported: 2015-06-02 11:35 UTC by Jiri Kovalsky
Modified: 2015-11-20 12:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 217687


Attachments
stacktrace (2.46 KB, text/plain)
2015-06-02 11:35 UTC, Jiri Kovalsky
Details
Required project dump file. (10.21 KB, application/octet-stream)
2015-06-02 11:38 UTC, Jiri Kovalsky
Details
stacktrace (2.45 KB, text/plain)
2015-06-03 06:44 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2015-06-02 11:35:18 UTC
Build: NetBeans IDE Dev (Build 201506020405)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.9.0-ea-b66, Java(TM) SE Runtime Environment, 1.9.0-ea-b66
OS: Linux

User Comments:
jkovalsky: My Maven based project had unresolved problems (reference to missing JDK 1.8 platform) so I decided to resolve it. In "Resolve Project Problems" dialog I clicked "Resolve..." button, there were two "JDK 1.9" and "JDK 1.9 (Default)" registered platforms, so I selected "JDK 1.9", clicked "Remove" button and then clicked "Add Platform..." button. This exception was thrown and dialog for adding new Java Platform opened.




Stacktrace: 
com.sun.tools.javac.code.Symbol$CompletionFailure: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.importAll(TypeEnter.java:435)
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.resolveImports(TypeEnter.java:338)
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.access$1700(TypeEnter.java:286)
   at com.sun.tools.javac.comp.TypeEnter.lambda$ensureImportsChecked$47(TypeEnter.java:173)
   at com.sun.tools.javac.comp.TypeEnter.finishImports(TypeEnter.java:224)
   at com.sun.tools.javac.comp.TypeEnter.ensureImportsChecked(TypeEnter.java:173)
Comment 1 Jiri Kovalsky 2015-06-02 11:35:20 UTC
Created attachment 154011 [details]
stacktrace
Comment 2 Jiri Kovalsky 2015-06-02 11:38:23 UTC
Created attachment 154013 [details]
Required project dump file.
Comment 3 Jiri Kovalsky 2015-06-02 11:46:32 UTC
Most probably another JDK 9 specific issue as this does not happen when IDE is run on JDK 1.8.0_45. Please remove the keyword if my assumption is wrong.
Comment 4 Martin Entlicher 2015-06-03 06:44:13 UTC
Created attachment 154027 [details]
stacktrace

Opened an existing Java project using JDK 8 platform in NetBeans running on JDK 9. JDK 8 platform is not defined and Resolve Project Problems is correctly available. But this exception should not be thrown.
Comment 5 Dusan Balek 2015-11-20 12:47:51 UTC
Fixed in jet-main jdk9.

http://hg.netbeans.org/main/nb-javac-jdk9/rev/a00a59e3f01b