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

Jetty fails to start on OpenJDK 9: "Invalid Java version 9.0.1.3" #2090

Closed
IvoLimmen opened this issue Jan 3, 2018 · 7 comments
Closed

Jetty fails to start on OpenJDK 9: "Invalid Java version 9.0.1.3" #2090

IvoLimmen opened this issue Jan 3, 2018 · 7 comments
Assignees
Labels
Bug For general bugs on Jetty side
Milestone

Comments

@IvoLimmen
Copy link

Jetty (bom) version: 9.4.8.v20171121

OpenJDK version:
openjdk version "9.0.1.3"
OpenJDK Runtime Environment (Zulu build 9.0.1.3+11)
OpenJDK 64-Bit Server VM (Zulu build 9.0.1.3+11, mixed mode)

@janbartel
Copy link
Contributor

Can you show your start command (maven, command line, embedded?) and the actual output?

@gregw gregw added the Bug For general bugs on Jetty side label Jan 3, 2018
@gregw gregw added this to the 9.4.x milestone Jan 3, 2018
@IvoLimmen
Copy link
Author

Exception in thread "main" java.lang.ExceptionInInitializerError
at org.eclipse.jetty.webapp.WebInfConfiguration.findAndFilterContainerPaths(WebInfConfiguration.java:186)
at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:156)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:506)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:544)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
at org.eclipse.jetty.server.Server.start(Server.java:418)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:385)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.keyprocessor.boot.Main.initialize(Main.java:72)
at com.keyprocessor.boot.Main.main(Main.java:39)
Caused by: java.lang.IllegalArgumentException: Invalid Java version 9.0.1.3
at org.eclipse.jetty.util.JavaVersion.parseJDK9(JavaVersion.java:71)
at org.eclipse.jetty.util.JavaVersion.parse(JavaVersion.java:49)
at org.eclipse.jetty.util.JavaVersion.(JavaVersion.java:43)
... 13 more

@IvoLimmen
Copy link
Author

I use embedded Jetty. I start the application using a generated script (appassembler-maven-plugin) only added the "--add-modules java.xml.bind" to the arguments to make sure it works.
Btw: version "9.4.7.v20170914" starts correctly with everything unchanged (so just upgrading Jetty makes it fail).

@gregw
Copy link
Contributor

gregw commented Jan 4, 2018

@IvoLimmen it is definitely a new bug. We now need to be a lot more java version sensitive because of java 9 features... but we did not anticipate 4 part version numbers. Fix is coming.

@gregw
Copy link
Contributor

gregw commented Jan 4, 2018

We need to comply with http://openjdk.java.net/jeps/223

@gregw
Copy link
Contributor

gregw commented Jan 4, 2018

I've pushed a fix to jetty-9.4.x branch.
The JavaVersion now handles both old format and full JEP223 versions. I have also shaded the class into the jetty-start module rather than duplicate the code.

@janbartel janbartel assigned janbartel and gregw and unassigned janbartel Jan 4, 2018
gregw added a commit that referenced this issue Jan 6, 2018
…2094)

* shaded TopologicalSort. Use shaded start in jetty-home
* removed unused property
* jetty-start shaded dependency
* removed component dependencies from TopologicalSort

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw
Copy link
Contributor

gregw commented Jan 6, 2018

I've merged the PR, as even though it is not totally agreed, we already had half a solution in the jetty-9.4.x branch. Currently the risk is that we may break anybody that directly consumes jetty-start.jar as a maven dependency. I think the risk is small and they have the option to do excludes and/or use the shaded jar when they upgrade, so let's give it a go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

3 participants