Jetty fails with configuration exception after update to OH 2.3.0-SNAPSHOT 1254

  • Platform information:
    • Hardware: odroid XU4
    • OS: Ubuntu 16.04.4
    • Java Runtime Environment: 1.8.0_161
    • openHAB version: 2.3.0-SNAPSHOT 1254
  • Issue of the topic: Exception while starting Jetty after update - that worked before my latest update, but now OH2 fails to start because of this exception
2018-04-14 15:44:59.617 [WARN ] [g.eclipse.jetty.xml.XmlConfiguration] - Config error at <Call name="addHandler"><Arg>
				<New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler"><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule"><Set name="header">X-Forwarded-Scheme</Set><Set name="headerValue">https</Set><Set name="scheme">https</Set></New>
						</Arg></Call><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule"><Set name="header">X-Forwarded-Scheme</Set><Set name="headerValue">http</Set><Set name="scheme">http</Set></New>
						</Arg></Call><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule"><Set name="regex">/$</Set><Set name="replacement">/start/index</Set></New>
						</Arg></Call></New>
			</Arg></Call>
2018-04-14 15:44:59.637 [WARN ] [g.eclipse.jetty.xml.XmlConfiguration] - Config error at <Get name="handler"><Call name="addHandler"><Arg>
				<New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler"><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule"><Set name="header">X-Forwarded-Scheme</Set><Set name="headerValue">https</Set><Set name="scheme">https</Set></New>
						</Arg></Call><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.ForwardedSchemeHeaderRule"><Set name="header">X-Forwarded-Scheme</Set><Set name="headerValue">http</Set><Set name="scheme">http</Set></New>
						</Arg></Call><Call name="addRule"><Arg>
							<New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule"><Set name="regex">/$</Set><Set name="replacement">/start/index</Set></New>
						</Arg></Call></New>
			</Arg></Call></Get>
2018-04-14 15:44:59.639 [ERROR] [rvice.jetty.internal.JettyServerImpl] - Exception while starting Jetty
java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:159) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:478) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:81) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerFactoryImpl$1.start(ServerControllerFactoryImpl.java:164) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:787) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:97) ~[?:?]
	at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:347) ~[?:?]
	at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$2(Activator.java:291) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.rewrite.handler.RewriteHandler cannot be found by org.ops4j.pax.web.pax-web-jetty_6.0.9
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
	at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:785) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1260) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1165) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.access$500(XmlConfiguration.java:276) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration$AttrOrElementNode.getList(XmlConfiguration.java:1393) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration$AttrOrElementNode.getList(XmlConfiguration.java:1368) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:731) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:419) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:700) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:422) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:302) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:247) ~[?:?]
	... 17 more
2018-04-14 15:44:59.698 [ERROR] [j.pax.web.service.internal.Activator] - Unable to start pax web server: Exception while starting Jetty
java.lang.RuntimeException: Exception while starting Jetty
	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:197) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:478) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:81) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerFactoryImpl$1.start(ServerControllerFactoryImpl.java:164) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:787) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:97) ~[?:?]
	at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:347) ~[?:?]
	at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$2(Activator.java:291) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:159) ~[?:?]
	... 12 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.rewrite.handler.RewriteHandler cannot be found by org.ops4j.pax.web.pax-web-jetty_6.0.9
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?]
	at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:785) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1260) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1165) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.access$500(XmlConfiguration.java:276) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration$AttrOrElementNode.getList(XmlConfiguration.java:1393) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration$AttrOrElementNode.getList(XmlConfiguration.java:1368) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:731) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:419) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.get(XmlConfiguration.java:700) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:422) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:302) ~[?:?]
	at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:247) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:159) ~[?:?]
	... 12 more

The jetty.xml configuration file is the same as in OH2.2

Any ideas, what to try? I’d like to keep the newest SNAPSHOT because of a fix in the Homematic bundle.

Seems to be solved with the build 1256. Whatever the problem was…

Going a little off topic: There is a downside to updating so often: the karaf bundle list is kind of reset each time I update, and I need one startup to initiliaze everything (no bundle gets loaded or identified), then a second start to install the bundles (also some swagger, json, transformation service, persistence and more bundles). But the met requirements are not checked (?), so I need a third start to have the bundles resolved, and until now, I always had to manually start a lot of bundles (though I am not sure if they would have started automatically after half an hour or so). Is this all normal?