-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
javac crash on java 8 after adding pojobuilder #71
Comments
Possibly the same reason as in #69. Thank you very much for your feedback! |
Can you please check this scenario with PB 3.0.0 and confirm that (or if) it has been fixed? |
Hi, I'm @gionn coworker, using java-7-openjdk and [email protected] the
So a prior clean is always required. Using java-8-oracle and [email protected] the compile goal not generates builders and the compilation fails. |
I guess this happens even with a simple setup? I'll try to handle this today or tomorrow. |
Manuel, I checked this on WIndows 7 but I got no failures using Maven and Java 7. Same for Java 8. The test code is package sample;
import net.karneim.pojobuilder.GeneratePojoBuilder;
@GeneratePojoBuilder
public class Contact {
public String name;
public int number;
} and the pom.xml: <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>sample</groupId>
<artifactId>sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>pojobuilder-maven-sample</name>
<dependencies>
<dependency>
<groupId>net.karneim</groupId>
<artifactId>pojobuilder</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project If you don't have any problems with this scenario, please post the scenario that causes the error, so I can reproduce it. |
Yes, this scenario works fine. But still does not work with java eight, I'll investigate in depth later |
Manuel, I tried 2 scenarios:
This is what I found out: Repleatedly invoking Since this is not what you want, you might want to disable the annotation processing in the ...
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build> This works both for Java 7 and Java 8. Is that a solution for you? |
Yeah, that was the culprit. I suggest to improve the README with those configurations in the maven section. Thanks for your support @mkarneim ! |
JFYI Disabling incremental compilation works in maven plugin, which resolved <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<compilerVersion>1.8</compilerVersion>
<source>1.8</source>
<target>1.8</target>
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin> |
For me, "-proc:none" solved it, though I don't know what it does to my build. The problem was introduced when using: |
The problem came up in my setup when I updated the compiler plugin to a 3.x version. Downgrading it to 2.5.1 fixed it. |
With java version: I upgraded my compiler-plugin version to 3.5.1 and worked! |
Hi,
after I've started using pojobuilder in a java 7 project using a java 8 jdk, and I found a reproducible issue every time the compile maven goal is executed without a prior clean.
Don't know if a workaround is possible, I've found only a fixed report in javadoc with the same error message: http://bugs.java.com/view_bug.do?bug_id=8029145
Anyone knows how to report a jdk bug to oracle?
Stacktrace for reference:
The text was updated successfully, but these errors were encountered: