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

An exception has occurred in the compiler: endPosTable already set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 8u45
    • tools
    • x86_64
    • windows_7

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Same as bug JDK-8068369

      Except simply use maven-compiler-plugin 3.2 (or later) and ensure you have 2 or more maven goals that result in a compile pass, for example "mvn clean install deploy".

      JavaC from JDK8u45
      Maven 3.3.3
      maven-compiler-plugin 3.2 (or later)
      -source 1.7
      -target 1.7
      Use if generated sources via compiler -processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor from org.hibernate:hibernate-jpamodelgen:4.3.10.Final

      A DESCRIPTION OF THE PROBLEM :
      Using the JDK7 compiler (7u40)


      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.3</version>
      <configuration>
      <source>1.7</source>
      <target>1.7</target><!-- EJB 3.1 need Java 1.6 -->
      <compilerArguments>
      <!-- Ensure to use 3.6.9.Final or later hibernate-jpamodelgen, see HHH-9528 -->
      <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
      </compilerArguments>
      </configuration>
      </plugin>
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-jpamodelgen</artifactId>
                              <version>4.3.10.Final</version>
      <scope>provided</scope><!-- needed by test, but also during building, but never export dep -->
      </dependency>


      REGRESSION. Last worked in version 7u80

      ADDITIONAL REGRESSION INFORMATION:
      JDK7 issues a complication error as:

      [ERROR] /path/to/target/generated-sources/annotations/package/path/ClassName_.java:[11,17] duplicate class package.path.ClassName_

      However JDK8 with -source 1.7 and -target 1.7 has a compiler error:

      An exception has occurred in the compiler (1.8.0_45). 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.IllegalStateException: endPosTable already set
      at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable(DiagnosticSource.java:136)
      at com.sun.tools.javac.util.Log.setEndPosTable(Log.java:350)
      at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:667)
      at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:892)

      .......

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      # Both install and deploy cause compile-default target to run, twice
      mvn -v clean install deploy

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      COMPLICATION ERROR with useful reason description, not an IllegalStateException and compiler abort.
      ACTUAL -
      The compiler aborts, without issuing a proper warning/error reason.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      See JDK-8068369 (I can only provide another after spending several hours anonymizing it and we have a workaround provides immediate fix).

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

      CUSTOMER SUBMITTED WORKAROUND :
      Use maven-compiler-plugin 3.1 or older OR
      Use JDK7

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: