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-runner startup error with jetty-10 #5798

Closed
cor3000 opened this issue Dec 11, 2020 · 4 comments
Closed

jetty-runner startup error with jetty-10 #5798

cor3000 opened this issue Dec 11, 2020 · 4 comments
Assignees

Comments

@cor3000
Copy link

cor3000 commented Dec 11, 2020

Jetty version 10.0.0

Java version openjdk version "11.0.9.1" 2020-11-04

OS type/version Linux Mint 20

Description

Starting any war file or webapp folder (I tried so far) using the jetty-runner results in the exceptions below
accessing localhost:8080 results in an error code 503

The same war files work with jetty-runner 9.4.35.

~/temp (mytheme)$ java -jar jetty-runner-10.0.0.jar anyapp.war
WARNING: jetty-runner is deprecated.
         See Jetty Documentation for startup options
         https://www.eclipse.org/jetty/documentation/
2020-12-11 16:21:22.136:INFO :oejr.Runner:main: Runner
2020-12-11 16:21:22.268:INFO :oejs.Server:main: jetty-10.0.0; built: 2020-12-02T21:06:43.949Z; git: b9645a17373e4e9b7f30b6c0a07defcea2cb660b; jvm 11.0.9.1+1-Ubuntu-0ubuntu1.20.04
2020-12-11 16:21:22.495:INFO :oeja.AnnotationConfiguration:main: Error:  for o.e.j.w.WebAppContext@6a41eaa2{/,file:///home/robert/workspace/temp/,STARTING}{file:///home/robert/workspace/temp/}
2020-12-11 16:21:22.803:INFO :oejw.StandardDescriptorProcessor:main: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-12-11 16:21:22.808:WARN :oejs.BaseHolder:main: Unable to load class org.eclipse.jetty.servlet.listener.ELContextCleaner
java.lang.ClassNotFoundException: org.eclipse.jetty.servlet.listener.ELContextCleaner
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:544)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at org.eclipse.jetty.util.Loader.loadClass(Loader.java:64)
	at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:102)
	at org.eclipse.jetty.servlet.ListenerHolder.doStart(ListenerHolder.java:75)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:386)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1321)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:867)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:310)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:537)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:124)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:124)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.server.Server.start(Server.java:474)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.server.Server.doStart(Server.java:419)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.runner.Runner.run(Runner.java:526)
	at org.eclipse.jetty.runner.Runner.main(Runner.java:587)
2020-12-11 16:41:14.661:WARN :oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@6a41eaa2{zk-gradle,/,file:///home/robert/workspace/temp/anyapp.war,UNAVAILABLE}{file:///home/robert/workspace/temp/anyapp.war}
javax.servlet.UnavailableException: Class loading error for holder org.eclipse.jetty.servlet.listener.ELContextCleaner@5876a9af{src=DESCRIPTOR:jar:file:/home/robert/.gradle/caches/modules-2/files-2.1/org.eclipse.jetty/jetty-runner/10.0.0/98bd427202487a042fe0876bdbbe487399c53eb1/jetty-runner-10.0.0.jar!/org/eclipse/jetty/webapp/webdefault.xml}
	at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:109)
	at org.eclipse.jetty.servlet.ListenerHolder.doStart(ListenerHolder.java:75)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:386)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1321)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:867)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:310)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:537)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:124)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:124)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:174)
	at org.eclipse.jetty.server.Server.start(Server.java:474)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:94)
	at org.eclipse.jetty.server.Server.doStart(Server.java:419)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:98)
	at org.eclipse.jetty.runner.Runner.run(Runner.java:526)
	at org.eclipse.jetty.runner.Runner.main(Runner.java:587)
2020-12-11 16:41:14.670:INFO :oejs.AbstractConnector:main: Started ServerConnector@23223dd8{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-12-11 16:41:14.681:INFO :oejs.Server:main: Started Server@56ac3a89{STARTING}[10.0.0,sto=0] @650ms


@cor3000
Copy link
Author

cor3000 commented Dec 11, 2020

related #1906

@lachlan-roberts
Copy link
Contributor

I can't get this to work either, I'm getting the same error described here even for a simple webapp. This issue (#4562) is relevant as well, apparently there are some issues using this with Java 11 and JPMS.

@jolarsen
Copy link

I had the same issue, but adding a new WebAppConfiguration() to the array sent to WebAppContext.setConfigurations() solved the problem

olamy added a commit that referenced this issue Mar 30, 2021
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
olamy added a commit that referenced this issue Apr 27, 2021
#6115)

* Issue #5798 fix jetty runner startup error and add jsp support as well

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* Add test to ensure jetty runner starts correctly

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* remove unused imports

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* fix help description

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* improvement based on Joakim comment, add it test with the path

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
@olamy
Copy link
Member

olamy commented Jun 6, 2021

fixed by cda38ab

@olamy olamy closed this as completed Jun 6, 2021
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

4 participants