Skip to content
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

Compile fails with Java 8 due to Scala 2.10 #497

Closed
burmanm opened this issue Mar 13, 2015 · 4 comments
Closed

Compile fails with Java 8 due to Scala 2.10 #497

burmanm opened this issue Mar 13, 2015 · 4 comments
Milestone

Comments

@burmanm
Copy link
Contributor

burmanm commented Mar 13, 2015

When trying to compile with Java 8, the compilation fails on swagger-generator:

[INFO] Compiling 1 source files to /home/miburman/projects/git/swagger-codegen/modules/swagger-generator/target/test-classes at 1426248936536
[ERROR] error: error while loading CharSequence, class file '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31-5.b13.fc21.x86_64/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
[INFO](class java.lang.RuntimeException/bad constant pool tag 18 at byte 10)
[ERROR] error: error while loading AnnotatedElement, class file '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31-5.b13.fc21.x86_64/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
[INFO](class java.lang.RuntimeException/bad constant pool tag 18 at byte 76)
[ERROR] two errors found

This can at least be fixed by changing swagger-generator/pom.xml scala-test_2.10 -> scala-test_2.11 and scala.version from 2.10.0 to 2.11.0, but that generates some warnings on the compile (multiple Scala versions). However, as a workaround it works.

@fehguy
Copy link
Contributor

fehguy commented Mar 13, 2015

This is master or develop_2.0? Going to 2.10.4 solves it as well

@burmanm
Copy link
Contributor Author

burmanm commented Mar 13, 2015

master

@fehguy fehguy added this to the v2.1.0-M2 milestone Mar 13, 2015
@mlasak
Copy link

mlasak commented Mar 25, 2015

Thanks @burmanm your hint worked for me. Can successfully build master now. Ibtw, i've spotted multiple declarations of the scala-version in the project root pom.xml there and there. Having a strong feeling that this cannot be intended...

fehguy added a commit that referenced this issue Apr 4, 2015
@fehguy
Copy link
Contributor

fehguy commented Apr 4, 2015

This should be fixed now, also removed the scala version.

@fehguy fehguy closed this as completed Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants