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

Add more Java versions to Travis CI build matrix #2403

Merged
merged 13 commits into from
Jul 2, 2018
Merged

Add more Java versions to Travis CI build matrix #2403

merged 13 commits into from
Jul 2, 2018

Conversation

joschi
Copy link
Member

@joschi joschi commented Jun 20, 2018

In order to cover the Java/JDK versions we want to support with Dropwizard with Travis CI, this pull request adds OpenJDK 8 through 11 (EA) to the Travis CI build matrix.

There were some minor changes in the Maven build, mostly adding build profiles for the respective Java/JDK versions.

The following issues are open until Java 11 is completely supported without hacks:

@jplock jplock added this to the 2.0.0 milestone Jun 20, 2018
@jplock
Copy link
Member

jplock commented Jun 25, 2018

@nickbabcock @joschi is this an issue with the SelfValidatorTest or javassist? It only seems to be failing on jdk8 for some reason.

ERROR] complexExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.253 s  <<< ERROR!
java.lang.NoClassDefFoundError: java/lang/StackWalker$Option
	at io.dropwizard.validation.SelfValidationTest.complexExample(SelfValidationTest.java:198)
Caused by: java.lang.ClassNotFoundException: java.lang.StackWalker$Option
	at io.dropwizard.validation.SelfValidationTest.complexExample(SelfValidationTest.java:198)
[ERROR] invalidExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.invalidExample(SelfValidationTest.java:210)
[ERROR] subClassExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.006 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.subClassExample(SelfValidationTest.java:142)
[ERROR] annotatedSubClassExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.annotatedSubClassExample(SelfValidationTest.java:153)
[ERROR] overridingSubClassExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.overridingSubClassExample(SelfValidationTest.java:164)
[ERROR] testDirectContextUsage(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.004 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.testDirectContextUsage(SelfValidationTest.java:190)
[ERROR] failingExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.004 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.failingExample(SelfValidationTest.java:134)
[ERROR] multipleTestingOfSameClass(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.003 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.multipleTestingOfSameClass(SelfValidationTest.java:180)
[ERROR] correctExample(io.dropwizard.validation.SelfValidationTest)  Time elapsed: 0.003 s  <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class javassist.util.proxy.DefineClassHelper
	at io.dropwizard.validation.SelfValidationTest.correctExample(SelfValidationTest.java:172)

@joschi
Copy link
Member Author

joschi commented Jun 25, 2018

@jplock Javassist 3.23.0-GA doesn't support Java 8 anymore and Javassist 3.22.0-GA doesn't support Java 11.

We'll either have to stop supporting Java 8 (EOL soon), not support Java 11 (released soon), or rewrite the functionality with a different library (e. g. Byte Buddy).

I think I'll give Byte Buddy a try if I have a few minutes to spare.

@jplock
Copy link
Member

jplock commented Jun 25, 2018

@joschi maybe when the next release comes out containing jboss-javassist/javassist#204, the tests will work again on JDK8. That puts us in a tricky position. We should support the latest LTS release (JDK11), but I'm not sure we should lose JDK8 support in DW 2.0.0 or not yet.

@joschi joschi added the blocked label Jun 26, 2018
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
<scope>runtime</scope>
</dependency>
Copy link
Contributor

@RohanNagar RohanNagar Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does adding the two dependencies above mean that Dropwizard applications will no longer need --add-modules java.xml.bind on Java 9+? Right now I need to manually include that option when running on Java 9

(Or not since they are runtime dependencies?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RohanNagar Yes, the additional command line parameters for java.xml.bind can be removed.

@joschi joschi removed the blocked label Jul 2, 2018
@joschi
Copy link
Member Author

joschi commented Jul 2, 2018

The pull request is done and ready to merge from my perspective.

The AppVeyor build failed for unrelated reasons (address already in use in parallel tests).

@jplock jplock merged commit e103b26 into master Jul 2, 2018
@jplock jplock deleted the travis-java branch July 2, 2018 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants