sismics / docs

Lightweight document management system packed with all the features you can expect from big expensive solutions
https://teedy.io
GNU General Public License v2.0
1.99k stars 489 forks source link

Compability issue with Jetty 11 #649

Closed vmario89 closed 1 year ago

vmario89 commented 2 years ago

Hi, i am currently upgrading my server from Fedora 34 to 36 and i also tried to use a newer Java version + Jetty version. Trying to deploy the webapp with Jetty 11 fails with error IllegalStateException: [..] is not a jakarta.servlet.Filter:

https://developpaper.com/illegalstateexception-is-not-a-jakarta-servlet-filter/

/opt/jetty-11.0.11/jetty-base# java -jar ../start.jar
2022-08-22 21:51:40.228:INFO :oejs.Server:main: jetty-11.0.11; built: 2022-06-21T21:42:55.454Z; git: 58487315cb75e0f5c81cc6fa50096cbeb3b9554e; jvm 17.0.4+8
2022-08-22 21:51:40.262:INFO :oejdp.ScanningAppProvider:main: Deployment monitor [file:///opt/jetty-11.0.11/jetty-base/webapps/]
2022-08-22 21:51:41.513:INFO :oejw.StandardDescriptorProcessor:main: NO JSP Support for /dms, did not find org.eclipse.jetty.jsp.JettyJspServlet
2022-08-22 21:51:41.531:INFO :oejss.DefaultSessionIdManager:main: Session workerName=node0
2022-08-22 21:51:41.566:WARN :oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@fd07cbb{Teedy,/dms,file:///tmp/jetty-0_0_0_0-8080-dms_war-_dms-any-14463998304364243923/webapp/,UNAVAILABLE}{/opt/jetty-11.0.11/jetty-base/webapps/dms.war}
MultiException[java.lang.IllegalStateException: class com.sismics.util.filter.CorsFilter is not a jakarta.servlet.Filter, java.lang.IllegalStateException: class com.sismics.util.filter.RequestContextFilter is not a jakarta.servlet.Filter, java.lang.IllegalStateException: class com.sismics.util.filter.TokenBasedSecurityFilter is not a jakarta.servlet.Filter, java.lang.IllegalStateException: class com.sismics.util.filter.HeaderBasedSecurityFilter is not a jakarta.servlet.Filter, jakarta.servlet.UnavailableException: Servlet class org.glassfish.jersey.servlet.ServletContainer is not a jakarta.servlet.Servlet]
    at org.eclipse.jetty.util.MultiException.ifExceptionThrow(MultiException.java:117)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:751)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    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:516)
    at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    at org.eclipse.jetty.server.Server.start(Server.java:469)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    at org.eclipse.jetty.start.Main.start(Main.java:517)
    at org.eclipse.jetty.start.Main.main(Main.java:75)
Suppressed: 
    |java.lang.IllegalStateException: class com.sismics.util.filter.RequestContextFilter is not a jakarta.servlet.Filter
    |   at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
    |   at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    |   at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    |   at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
    |   at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    |   at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    |   at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    |   at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    |   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:516)
    |   at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    |   at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    |   at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    |   at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    |   at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    |   at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    |   at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    |   at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.server.Server.start(Server.java:469)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    |   at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    |   at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    |   at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    |   at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    |   at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    |   at org.eclipse.jetty.start.Main.start(Main.java:517)
    |   at org.eclipse.jetty.start.Main.main(Main.java:75)
Suppressed: 
    |java.lang.IllegalStateException: class com.sismics.util.filter.TokenBasedSecurityFilter is not a jakarta.servlet.Filter
    |   at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
    |   at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    |   at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    |   at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
    |   at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    |   at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    |   at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    |   at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    |   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:516)
    |   at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    |   at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    |   at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    |   at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    |   at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    |   at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    |   at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    |   at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.server.Server.start(Server.java:469)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    |   at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    |   at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    |   at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    |   at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    |   at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    |   at org.eclipse.jetty.start.Main.start(Main.java:517)
    |   at org.eclipse.jetty.start.Main.main(Main.java:75)
Suppressed: 
    |java.lang.IllegalStateException: class com.sismics.util.filter.HeaderBasedSecurityFilter is not a jakarta.servlet.Filter
    |   at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
    |   at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    |   at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    |   at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
    |   at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    |   at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    |   at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    |   at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    |   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:516)
    |   at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    |   at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    |   at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    |   at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    |   at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    |   at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    |   at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    |   at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.server.Server.start(Server.java:469)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    |   at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    |   at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    |   at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    |   at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    |   at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    |   at org.eclipse.jetty.start.Main.start(Main.java:517)
    |   at org.eclipse.jetty.start.Main.main(Main.java:75)
Suppressed: 
    |jakarta.servlet.UnavailableException: Servlet class org.glassfish.jersey.servlet.ServletContainer is not a jakarta.servlet.Servlet
    |   at org.eclipse.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:514)
    |   at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:386)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
    |   at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
    |   at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
    |   at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    |   at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
    |   at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
    |   at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
    |   at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    |   at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    |   at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    |   at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    |   at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    |   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:516)
    |   at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    |   at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    |   at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    |   at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    |   at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    |   at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    |   at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    |   at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    |   at org.eclipse.jetty.server.Server.start(Server.java:469)
    |   at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    |   at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    |   at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    |   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    |   at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    |   at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    |   at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    |   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    |   at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    |   at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    |   at org.eclipse.jetty.start.Main.start(Main.java:517)
    |   at org.eclipse.jetty.start.Main.main(Main.java:75)
Caused by: 
java.lang.IllegalStateException: class com.sismics.util.filter.CorsFilter is not a jakarta.servlet.Filter
    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:724)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
    at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:749)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1305)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:533)
    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:516)
    at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
    at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:456)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
    at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
    at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
    at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
    at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
    at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
    at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
    at org.eclipse.jetty.server.Server.start(Server.java:469)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
    at org.eclipse.jetty.server.Server.doStart(Server.java:414)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
    at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:228)
    at org.eclipse.jetty.start.Main.start(Main.java:517)
    at org.eclipse.jetty.start.Main.main(Main.java:75)
2022-08-22 21:51:41.583:INFO :oejs.AbstractConnector:main: Started ServerConnector@673be18f{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2022-08-22 21:51:41.591:INFO :oejs.Server:main: Started Server@1623b78d{STARTING}[11.0.11,sto=5000] @2139ms

i am going to try what happens with an older jetty instance

vmario89 commented 2 years ago

Okay got it working with Jetty version 10 and JDK 17 by doing the following things:

Adjust pom.xml in docs-core to replace with newer dependencies and recompile the war archive file

cd /opt/teedy/docs-core #the folder where i got the sismics-docs git repo cloned into
vim pom.xml
     <!-- JDK 17 JAXB dependencies -->
     <dependency>
       <groupId>javax.xml.bind</groupId>
       <artifactId>jaxb-api</artifactId>
       <version>2.3.1</version>
    </dependency>

    <dependency>
       <groupId>com.sun.xml.bind</groupId>
       <artifactId>jaxb-core</artifactId>
       <version>3.0.2</version>
    </dependency>

    <dependency>
       <groupId>com.sun.xml.bind</groupId>
       <artifactId>jaxb-impl</artifactId>
       <version>3.0.2</version>
    </dependency>

Recompile:

cd /opt/teedy
mvn clean -DskipTests install
mvn -Pprod -DskipTests clean install
cp /opt/teedy/docs-web/target/docs-web-1.10.war /opt/jetty/jetty-base/webapps/dms.war

Then download Jetty 10 and do some basic configuration

cd /opt
wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/10.0.11/jetty-home-10.0.11.tar.gz
tar -xvzf jetty-home-10.0.11.tar.gz
mkdir /opt/jetty-10.0.11/jetty-base/
cd /opt/jetty-10.0.11/jetty-base/
java -jar ../start.jar --add-modules=deploy,http
cp /opt/teedy-webapp-deploy-bup/docs-web-1.*.war /opt/jetty/jetty-base/webapps/dms.war #copy the compiled war archive
cp /opt/teedy-webapp-deploy-bup/dms.xml /opt/jetty/jetty-base/webapps/dms.xml
chown -R jetty:jetty /opt/jetty/

my adjusted dms.xml looks alike:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/dms</Set>
  <Set name="war"><SystemProperty name="jetty.data" default="."/>/webapps/dms.war</Set>

  <Call class="java.lang.System" name="setProperty">
    <Arg>docs.home</Arg>
    <Arg>/opt/teedy/data/</Arg>
  </Call>
</Configure>

the first two lines where not required in an older Jetty 9 instance

the service file to run Jetty with dms finally:

vim /usr/lib/systemd/system/jetty.service

[Unit]
Description = Jetty Web Server for DMS
After = syslog.target network.target

[Service]
User = jetty
ExecStart = /opt/jetty/bin/jetty.sh start
ExecStop = /opt/jetty/bin/jetty.sh stop
ExecReload = /opt/jetty/bin/jetty.sh restart
Type = forking
Environment="DATABASE_URL=jdbc:postgresql://127.0.0.1:5432/teedy_db"
Environment="DATABASE_USER=teedy"
Environment="DATABASE_PASSWORD=YourInstancePassword"
Environment="JETTY_HOME=/opt/jetty"
Environment="JETTY_BASE=/opt/jetty/jetty-base"
Environment="JETTY_USER=jetty"
Environment="JETTY_HOST=0.0.0.0"
Environment="JETTY_ARGS=jetty.port=8081"

[Install]
WantedBy = multi-user.target
jendib commented 2 years ago

The clean way to do it would be to change the Jetty version in the dependencies (pom.xml) and run the tests on that.

jendib commented 1 year ago

Closing this in favor of #668