Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6348499

javac crashes at com.sun.tools.javac.jvm.ClassReader$BadClassFile

    Details

    • Subcomponent:
    • Introduced In Build:
      b57
    • Introduced In Version:
      6

      Description

      The javac crashes at "com.sun.tools.javac.jvm.ClassReader$BadClassFile" when trying to handle with the class file that is created by the '(new Filer()).createClassFile()' method.

      Pasting the error messages below. Also attached the source code with the bug report.

      <Error-MSG>
      bash-2.05$ /jdk/sol/b292b/j2sdk1.6.0/bin/javac -J-version
      java version "1.6.0-auto"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-auto-304a)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b58, mixed mode)

      bash-2.05$ javac -cp /jdk/sol/b304a/j2sdk1.6.0/lib/tools.jar:. -processor simpleAP -processorpath simpleAP.jar -proc:only B.java
      @visitType()
      B
      An exception has occurred in the compiler (1.6.0-auto). 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.
      com.sun.tools.javac.jvm.ClassReader$BadClassFile: bad class file: newfile.class
      illegal start of class file
      Please remove or make sure it appears in the correct subdirectory of the classpath.
      at com.sun.tools.javac.jvm.ClassReader.badClassFile(ClassReader.java:248)
      at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:1367)
      at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1528)
      at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1471)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:370)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:740)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.getAnnotationMirrors(Symbol.java:682)
      at com.sun.tools.javac.model.JavacElements.getAllAnnotationMirrors(JavacElements.java:408)
      at com.sun.tools.javac.model.JavacElements.getAllAnnotationMirrors(JavacElements.java:46)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:477)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:627)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:843)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:629)
      at com.sun.tools.javac.main.Main.compile(Main.java:756)
      at com.sun.tools.javac.main.Main.compile(Main.java:681)
      at com.sun.tools.javac.main.Main.compile(Main.java:670)
      at com.sun.tools.javac.Main.compile(Main.java:70)
      at com.sun.tools.javac.Main.main(Main.java:55)
      </Error-MSG>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                bkondepusunw Bala Kondepudi (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: