Closed ifujiwara-github closed 7 months ago
Likely you just need to enable the Jetty EE10 Modules
Jetty 12 supports EE8, EE9 and EE10 so certain modules are no longer enabled by default. So can you try adding a line like this into your dockerfile
RUN java -jar "$JETTY_HOME/start.jar" --add-modules=ee10-webapp,ee10-deploy,ee10-jsp,ee10-jstl
Thanks.Booting success, other error occurred. Is there a problem with servlet configuration?
2024-04-09 03:52:43.272:WARN :oejew.WebAppContext:main: Failed startup of context oeje10w.WebAppContext@493dfb8e{root,/,b=file:///tmp/jetty-0_0_0_0-8080-root_war-_-any-16711043961830662755/webapp/,a=STOPPED,h=oeje10s.SessionHandler@acdcf71{STOPPED}}{/var/lib/jetty/webapps/root.war}
java.lang.IllegalStateException: No Jetty ServletContextHandler, Jetty WebSocket SCI unavailable
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.getServletContextHandler(ServletContextHandler.java:171)
at org.eclipse.jetty.ee10.websocket.server.config.JettyWebSocketServletContainerInitializer.onStartup(JettyWebSocketServletContainerInitializer.java:99)
at org.eclipse.jetty.ee10.servlet.ServletContainerInitializerHolder.doStart(ServletContainerInitializerHolder.java:155)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler$ServletContainerInitializerStarter.doStart(ServletContextHandler.java:3042)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1290)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1223)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1043)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1151)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1040)
at org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:496)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:40)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:522)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:162)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.pathAdded(ScanningAppProvider.java:293)
at org.eclipse.jetty.deploy.providers.ContextProvider.pathAdded(ContextProvider.java:520)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.pathAdded(ScanningAppProvider.java:69)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:902)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:868)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:775)
at org.eclipse.jetty.util.Scanner.startScanning(Scanner.java:664)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:636)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:264)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:592)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:263)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:622)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.server.Server.doStart(Server.java:563)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:2033)
2024-04-09 03:52:43.274:INFO :oejs.DefaultSessionIdManager:main: Session workerName=node0
2024-04-09 03:52:43.304:INFO :oejs.AbstractConnector:main: Started ServerConnector@48eb9836{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2024-04-09 03:52:43.317:INFO :oejs.Server:main: Started oejs.Server@dd8ba08{STARTING}[12.0.7,sto=5000] @6223ms
pom.xml
<properties> ... <jakarta-servlet.version>6.0.0</jakarta-servlet.version> </properties>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<type>jar</type>
<scope>provided</scope>
</dependency>
Not completely sure why this one is happening.
Did you enable the ee10-websocket-jetty
module? If not you should do that, but I then not sure why you are already reaching the JettyWebSocketServletContainerInitializer
. Maybe you have included the Jetty WebSocket jars in you application?
I haven't included Jetty WebSocket jars in my app ,but I added the module and it was resolved. thanks you.
I am facing issue and the war is not starting , the app is migrated spring boot:3.1.3→3.2.4 jakarta:5.0.0→6.0.0
Its working locally but not working with docker.
I am expecting the java/spring boot based jar will boot strap and show message like