-
Bug
-
Resolution: Fixed
-
P2
-
8u25
-
b155
-
x86_64
-
windows_7
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174495 | 10 | Jan Lahoda | P2 | Resolved | Fixed | b01 |
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 8 64 bit
A DESCRIPTION OF THE PROBLEM :
Maven compilation with annotation processing enabled fails, if the target/generated-sources/metamodel directory is not empty.
If it's not empty, javac fails to compile.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create at least 1 JPA entity (@Entity) and a persistence unit
Configure maven to use an annotation processor (QueryDSL 3.6 or eclipseLink 2.5.2) during compilation (both tested, giving the same exception)
run: mvn compile twice, without using mvn clean in between, i.e.
> mvn clean compile
> mvn compile
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compilation succeeds both times
ACTUAL -
The first compilation succeeds. the second fails with an exception.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
[INFO] Compiling 108 source files to myproject\target\classes
An exception has occurred in the compiler (1.8.0_25). 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)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:921)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1187)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:125)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:823)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
SampleEntity.java:
@Entity
public class SampleEntity {
@Id
public long id;
@Version
public long version;
public String name;
}
maven POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>mavenproject1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<generatedSourcesDirectory>${basedir}/target/generated-sources/metamodel</generatedSourcesDirectory>
<showWarnings>true</showWarnings>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
<compilerId>javac</compilerId>
<!-- <verbose /> -->
<annotationProcessors>
<annotationProcessor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- Needed for annotation processing only -->
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>3.6.0</version>
<classifier>jpa</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
none known
- backported by
-
JDK-8174495 javac throws exception during compilation when annotation processing is enabled
- Resolved
- duplicates
-
JDK-8073185 "IllegalStateException: endPosTable already set" not fixed
- Closed
-
JDK-8078472 Error while deploying project in Netbeans with Glassfish
- Closed
-
JDK-8087106 Error when rebuilding already built program
- Closed
-
JDK-8129929 An exception has occurred in the compiler: endPosTable already set
- Closed
-
JDK-8146348 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8202403 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8076992 Running mvn install twice causes IllegalStateException: endPosTable already set
- Closed
-
JDK-8133555 Annotation Processor Failure
- Closed
-
JDK-8144159 when compiling protostrem, An exception has occurred in the compiler (1.8.0_45)
- Closed
-
JDK-8144564 compilation error: java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8148357 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8151694 i just run mvn clean install test
- Closed
-
JDK-8152274 Compiler error whilst running mvn package
- Closed
-
JDK-8161112 An exception has occurred in the compiler (1.8.0_92)
- Closed
-
JDK-8167269 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8176032 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8176189 Exception while compiling: endPosTable already set
- Closed
-
JDK-8177437 IllegalStateException: endPosTable already set at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable
- Closed
-
JDK-8178156 IllegalStateException: endPosTable already set
- Closed
-
JDK-8180831 javac: java.lang.IllegalStateException: endPosTable already set at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable
- Closed
-
JDK-8187901 Compile error while Gradle executing queryDSL task
- Closed
-
JDK-8198353 Javac throws java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8201130 java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8078472 Error while deploying project in Netbeans with Glassfish
- Closed
-
JDK-8062800 Occasional java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8143284 Compiler failed with exception
- Closed
-
JDK-8176719 IllegalStateException: endPosTable already set at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable
- Closed
- relates to
-
JDK-8132005 Compile error with an IllegatStateException
- Closed
-
JDK-8029145 javadoc fails with java.lang.IllegalStateException: endPosTable already set
- Closed
-
JDK-8075308 apt-maven-plugin:1.1.3:process (default)
- Closed
-
JDK-8338483 Idea(IDE) run build project threw java.lang.IllegalStateException
- New