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 269365 - IllegalStateException: Cannot use Elements.getModuleElement before the TaskEvent.Kind.ENTER finished event.
Summary: IllegalStateException: Cannot use Elements.getModuleElement before the TaskEv...
Status: STARTED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-16 10:37 UTC by Exceptions Reporter
Modified: 2017-08-01 08:04 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226593


Attachments
stacktrace (3.68 KB, text/plain)
2016-12-16 10:37 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2016-12-16 10:37:09 UTC
Build: NetBeans IDE Dev (Build 201612130001)
VM: Java HotSpot(TM) 64-Bit Server VM, 9-ea+149, Java(TM) SE Runtime Environment, 9-ea+149
OS: Mac OS X

User Comments:
GUEST: starting netbeans, background scanning

dgbarber: Create a new JavaFX project

rrhegde: <Please provide a description of the problem or the steps to reproduce>

GUEST: New java 9 project

GUEST: Try to open Java 9 module project, fails when loading. 

Module compiles on commandline.

rrhegde: <Please provide a description of the problem or the steps to reproduce>




Stacktrace: 
java.lang.IllegalStateException: Cannot use Elements.getModuleElement before the TaskEvent.Kind.ENTER finished event.
   at com.sun.tools.javac.model.JavacElements.ensureEntered(JavacElements.java:717)
   at com.sun.tools.javac.model.JavacElements.getModuleElement(JavacElements.java:105)
   at com.sun.tools.javac.model.JavacElements.getModuleElement(JavacElements.java:70)
   at org.netbeans.modules.java.source.JavaSourceUtilImpl$1.resolveModule(JavaSourceUtilImpl.java:300)
   at org.netbeans.modules.java.preprocessorbridge.api.ModuleUtilities.resolveModule(ModuleUtilities.java:112)
   at org.netbeans.modules.java.api.common.classpath.ModuleClassPaths$ModuleInfoClassPathImplementation.getResources(ModuleClassPaths.java:670)
Comment 1 Exceptions Reporter 2016-12-16 10:37:12 UTC
Created attachment 163261 [details]
stacktrace
Comment 2 Tomas Zezula 2016-12-16 11:55:49 UTC
The exception is caused by JDK9b148+ which changed format of "Module" attribute.
We are working on the update of the class reader to work correctly with b148.