ShortURLs with Jetty not working

Hi,

I’m setting up a new xwiki-instance for testing (16.5 on Ubuntu 24.04 with Jetty using the packages) and it’s working quite fine. But when i try to follow the ShortURL-Guide (https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/ShortURLs/) using the URLRewriteFilter, I’ll get an error. Based on the docs the Urlrewrite,jar should work with jetty, too. I’ve already another older instance (but with tomcat), where urlrewrite is working well. This is the error I’ll get during startup:

2024-07-22 11:50:19.749:INFO :oxtjl.NotifyListener:main: Starting Jetty on port 8080, on Java 17.0.11+9-Ubuntu-1 (OpenJDK Runtime Environment)...
2024-07-22 11:50:20.676:WARN :oejsh.AllowSymLinkAliasChecker:main: Deprecated, use SymlinkAllowedResourceAliasChecker instead.
2024-07-22 11:50:26,186 [main] INFO  iPropertiesConfigurationSource - Loading [xwiki.properties] from default location [/etc/xwiki/xwiki.properties]
2024-07-22 11:50:26,397 [main] INFO  o.x.e.i.ServletEnvironment     - Using permanent directory [/var/lib/xwiki/data]
2024-07-22 11:50:40,217 [main] INFO  o.x.s.s.i.EmbeddedSolr         - Updating Solr home directory at [/var/lib/xwiki/data/store/solr]
2024-07-22 11:50:40,242 [main] INFO  o.x.s.s.i.EmbeddedSolr         - Starting embedded Solr server...
2024-07-22 11:50:40,243 [main] INFO  o.x.s.s.i.EmbeddedSolr         - Using Solr home directory: [/var/lib/xwiki/data/store/solr]
2024-07-22 11:50:42,124 [main] WARN  o.a.s.c.CoreContainer          - Not all security plugins configured!  authentication=disabled authorization=disabled.  Solr is only as secure as you make it. Consider configuring authentication/authorization before exposing Solr to users internal or external.  See https://s.apache.org/solrsecurity for more info
2024-07-22 11:50:46,437 [main] INFO  o.x.s.s.i.EmbeddedSolr         - Started embedded Solr server.
2024-07-22 11:50:46,860 [main] INFO  o.x.s.f.i.FilesystemStoreTools - Using filesystem store directory [/var/lib/xwiki/data/store/file]
2024-07-22 11:50:47,835 [main] INFO  o.x.o.i.s.DefaultOfficeServer  - Open Office instance started.
2024-07-22 11:50:47.923:WARN :oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@61001b64{XWiki,/,file:///usr/lib/xwiki/,UNAVAILABLE}{/usr/lib/xwiki}
java.lang.NoClassDefFoundError: jakarta/servlet/Filter
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
        at org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:594)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:567)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:502)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        at org.eclipse.jetty.util.Loader.loadClass(Loader.java:59)
        at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:97)
        at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)
        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:1304)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:901)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532)
        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:210)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:442)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:61)
        at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:284)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:896)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:862)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:769)
        at org.eclipse.jetty.util.Scanner.startScanning(Scanner.java:658)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:630)
        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:182)
        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:470)
        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:415)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1919)
        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:229)
        at org.eclipse.jetty.start.Main.start(Main.java:528)
        at org.eclipse.jetty.start.Main.main(Main.java:76)
Caused by:
java.lang.ClassNotFoundException: jakarta.servlet.Filter
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:511)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
        at org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:594)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:567)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:502)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        at org.eclipse.jetty.util.Loader.loadClass(Loader.java:59)
        at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:97)
        at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)
        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:1304)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:901)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532)
        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:210)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:442)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:61)
        at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:284)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:896)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:862)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:769)
        at org.eclipse.jetty.util.Scanner.startScanning(Scanner.java:658)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:630)
        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:182)
        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:470)
        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:415)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1919)
        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:229)
        at org.eclipse.jetty.start.Main.start(Main.java:528)
        at org.eclipse.jetty.start.Main.main(Main.java:76)
2024-07-22 11:50:47.945:INFO :oxtjl.NotifyListener:main: ----------------------------------
2024-07-22 11:50:47.946:INFO :oxtjl.NotifyListener:main: Server started, you can now open http://localhost:8080/ in your browser to access your wiki.
2024-07-22 11:50:47.946:INFO :oxtjl.NotifyListener:main: ----------------------------------

When i call the URL because it says “started”, i’ll get an HTTP 503 error. I’ve I revoke the changes for the urlrewrite, it’s working again. Any idea what I’ve did wrong?

Thanks,
Gerd

I’m no expert by any means but

2024-07-22 11:50:47.923:WARN :oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@61001b64{XWiki,/,file:///usr/lib/xwiki/,UNAVAILABLE}{/usr/lib/xwiki}

does seem problematic , perhaps you can share your web.xml so thast we can double check the and are first so that they’re executed before any other XWiki filter.

please also share your WEB-INF/urlrewrite.xml

Thanks for the reply.
I’ve followed this guide: https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/ShortURLs/#HUrlRewriteFilter

and - my last try was using the docker-file as “instruction” to get path and filecontents:

So there is the base of my urlrewrite.xml. And it’s the default web.xml, and i added the block in the top directly after the first web-app-Tag before absolute-ordering, as shown in the diff-File.

I’ve just reverted the changes for the next try, so I can’t copy the full file-content now.

I think I’ll switch to nginx as reverse-proxy, which i tried to avoid to keep the installation as small as possible, but if it doesn’t work, I have to…

Thanks

After a lot of errors I’ve tried it now with nginx as reverse-proxy, but now i’ll get other errors - maybe some of you can point me in the right direction.

According to https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/ShortURLs/#HNginx, my config is:

added in web.xml after all other servlet-mappings:

<servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>

changed defaultservletpath in xwiki.cfg to empty value, so the entries are now:

xwiki.webapppath= 
xwiki.defaultservletpath=
xwiki.showviewaction=0

(webapp deployed as ROOT)

and when i start the xwiki-Service, i get a lot of warnings like:

2024-07-23 14:11:39.407:WARN :oejs.HttpChannel:qtp1956710488-16: /
javax.servlet.ServletException: Failed to extract the Entity Action from URL [http://172.25.21.231:8080/]
        at com.xpn.xwiki.web.LegacyActionServlet.getActionName(LegacyActionServlet.java:127)
        at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
        at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
        at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
        at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:108)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
        at org.eclipse.jetty.server.Server.handle(Server.java:563)
        at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:193)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by:
org.xwiki.resource.CreateResourceTypeException: Invalid standard scheme URL type. The URL is missing a path segment and should be of the format [/<type>/something/...]
        at org.xwiki.url.internal.standard.StandardStringResourceTypeResolver.resolve(StandardStringResourceTypeResolver.java:56)
        at org.xwiki.url.internal.standard.StandardStringResourceTypeResolver.resolve(StandardStringResourceTypeResolver.java:43)
        at org.xwiki.url.internal.DefaultStringResourceTypeResolver.resolve(DefaultStringResourceTypeResolver.java:81)
        at org.xwiki.url.internal.DefaultStringResourceTypeResolver.resolve(DefaultStringResourceTypeResolver.java:45)
        at org.xwiki.url.internal.AbstractExtendedURLResourceTypeResolver.resolve(AbstractExtendedURLResourceTypeResolver.java:89)
        at org.xwiki.url.internal.standard.StandardExtendedURLResourceTypeResolver.resolve(StandardExtendedURLResourceTypeResolver.java:100)
        at org.xwiki.url.internal.standard.StandardExtendedURLResourceTypeResolver.resolve(StandardExtendedURLResourceTypeResolver.java:57)
        at org.xwiki.url.internal.DefaultResourceTypeResolver.resolve(DefaultResourceTypeResolver.java:76)
        at org.xwiki.url.internal.DefaultResourceTypeResolver.resolve(DefaultResourceTypeResolver.java:45)
        at com.xpn.xwiki.web.LegacyActionServlet.getActionName(LegacyActionServlet.java:120)
        at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
        at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
        at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
        at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:108)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170)
        at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
        at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
        at org.eclipse.jetty.server.Server.handle(Server.java:563)
        at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
        at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
        at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
        at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:193)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
        at java.base/java.lang.Thread.run(Thread.java:840)

It seems to work somehow, but there are a lot of these warnings in the logs, no matter if i call it using nginx and reverse-proxy, or directly via jetty (port 8080), so i think it must have something to do with the xwiki.cfg or web.xml?

Thanks in advance,
gerd

OK - the error above was from an healtch-check-application, which still called the “old” URL - changing this made the error disappear.

So current state - it seems to work with:
Ubuntu 24.04 LTS - package xwiki-xjetty-mariadb

  • deploy as root (for nginx only move/rename webapp, no changes of context-files if installed via packages - i didn’t find them and it’s working without warning)
  • servlet mapping name: done via nginx reverse proxy and the config mainly from the documentation page
  • action name - only config as described in documentation

urlrewrite.jar doesn’t seem to work anymore on the newer installations. I’ve tried yesterday on some “new” machines in virtualbox, i didn’t manage to get them running, even with ubuntu 22.04 and tomcat9 (but maybe I just did something wrong every time - I’m not a professional in this area).

Last challenge is OIDC, which isn’t working anymore. But I hope it’s just config as stated here:

(but what to do for nginx?.. i will find out).

So sorry for some false alarms here, but it’s not so easy to get the nice features running. Documentation is there but there are so many possibilites, so I’m never sure which one to choose for which version.

OIDC is working also now - i just want to link to this thread which may help someone to get the right direction where to look:

With this information i found additional proxy-headers to set, and that i should set xwiki.url.protocol=https which i hadn’t before (i thought the reverse proxy will take care of this).
Without this, the OIDC-redirect (in my case Azure) won’t work correctly.

1 Like