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 206627 - IllegalAccessError: tried to access class com.sun.tools.javap.CodeWriter from class org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder
Summary: IllegalAccessError: tried to access class com.sun.tools.javap.CodeWriter from...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2011-12-21 18:52 UTC by Jesse Glick
Modified: 2012-01-02 14:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 183935


Attachments
stacktrace (6.78 KB, text/plain)
2011-12-21 18:52 UTC, Jesse Glick
Details
stacktrace (6.99 KB, text/plain)
2011-12-28 13:54 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-12-21 18:52:41 UTC
Build: NetBeans IDE Dev (Build 20111219-0ae38b1951e6)
VM: Java HotSpot(TM) Client VM, 22.0-b10, Java(TM) SE Runtime Environment, 1.7.0_02-b13
OS: Linux

User Comments:
jglick: Made a j2seproject and added .../jigsaw/build/linux-amd64/modules/jdk.boot/classes/ to its classpath; then imported Library and tried to use Go to Source (in the hope of manually attaching the source path).




Stacktrace: 
java.lang.IllegalAccessError: tried to access class com.sun.tools.javap.CodeWriter from class org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder
   at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitExecutable(CodeGenerator.java:515)
   at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitExecutable(CodeGenerator.java:266)
   at com.sun.tools.javac.code.Symbol$MethodSymbol.accept(Symbol.java:1411)
   at javax.lang.model.util.AbstractElementVisitor6.visit(AbstractElementVisitor6.java:104)
   at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitType(CodeGenerator.java:310)
   at org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitType(CodeGenerator.java:266)
Comment 1 Jesse Glick 2011-12-21 18:52:44 UTC
Created attachment 114398 [details]
stacktrace
Comment 2 Jesse Glick 2011-12-28 13:54:21 UTC
Created attachment 114506 [details]
stacktrace
Comment 3 Jesse Glick 2011-12-28 14:08:55 UTC
This is happening to me a lot. In a dev build, trying to generate sources for a class file does not work at all.

Seems that main/nb-javac #c2a3eeabe3cb is trying to treat CodeWriter as public, but it is not public in the actual JDK. libs.javacimpl/manifest.mf specifies

OpenIDE-Module-Hide-Classpath-Packages: com.sun.tools.javac.**, com.sun.tools.javadoc.**

but does not mention com.sun.tools.javap.
Comment 4 Jan Lahoda 2011-12-28 18:21:40 UTC
Yes, thanks, I completely forgot this option.

http://hg.netbeans.org/jet-main/rev/9eb86de24439
Comment 5 Quality Engineering 2011-12-29 14:00:00 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/9eb86de24439
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #206627: need to also mask com.sun.tools.javap in libs.javacimpl.