JDK-6868135 : java.lang.NullPointerException from compiler (1.7.0-ea)
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-08-04
  • Updated: 2011-02-16
  • Resolved: 2009-08-04
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
C:\Programme\Java\jdk1.7.0\bin>java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b67)
Java HotSpot(TM) Client VM (build 16.0-b07, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows XP SR-3

EXTRA RELEVANT SYSTEM CONFIGURATION :
Using NetBeans 6.7.1

use ....\jdk\make\netbeans\charset\build.xml

A DESCRIPTION OF THE PROBLEM :
Regression: worked on b63

See Error Messages

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run compile-single from NetBeans on java.lang.System.java



ERROR MESSAGES/STACK TRACES THAT OCCUR :
compile-single:
Compiling 1 source file to C:\Projects\OpenJDK7\jdk\build\windows-i586\classes
An exception has occurred in the compiler (1.7.0-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
java.lang.NullPointerException
        at com.sun.tools.javac.comp.MemberEnter$TypeAnnotate$1.enterAnnotation(MemberEnter.java:1050)
        at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:109)
        at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2142)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:416)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:805)
        at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:2306)
        at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:966)
        at com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:1131)
        at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:2001)
        at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1913)
        at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1659)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribType(Attr.java:409)
        at com.sun.tools.javac.comp.MemberEnter.signature(MemberEnter.java:371)
        at com.sun.tools.javac.comp.MemberEnter.visitMethodDef(MemberEnter.java:575)
        at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:655)
        at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:403)
        at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:415)
        at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:425)
        at com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1111)
        at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:984)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:416)
        at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:805)
        at com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:576)
        at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:584)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:416)
        at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:1539)
        at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1350)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:440)
        at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1296)
        at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1299)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:403)
        at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1079)
        at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1145)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:416)
        at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:432)
        at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:777)
        at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:768)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:416)
        at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:698)
        at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:655)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:379)
        at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:416)
        at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2795)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2721)
        at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2657)
        at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1122)
        at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:848)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:810)
        at com.sun.tools.javac.main.Main.compile(Main.java:400)
        at com.sun.tools.javac.main.Main.compile(Main.java:318)
        at com.sun.tools.javac.main.Main.compile(Main.java:309)
        at com.sun.tools.javac.Main.compile(Main.java:82)
        at com.sun.tools.javac.Main.main(Main.java:67)
C:\Projects\OpenJDK7\jdk\make\netbeans\common\shared.xml:199: The following error occurred while executing this line:
C:\Projects\OpenJDK7\jdk\make\netbeans\common\shared.xml:128: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 6 seconds)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
- Check out http://hg.openjdk.java.net/jdk7/tl/jdk/
- Apply patch from https://bugs.openjdk.java.net/show_bug.cgi?id=100098

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Maybe downgrade to JDK-7 b63