Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

Steinar Bang
In my quest to get my webapps ported from openjdk-8 to openjdk-11 I've
run into the issue, with "requirement missing osgi.ee=UNKNOWN", ie:
 org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=handlereg-with-derby; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=handlereg-with-derby)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))" [caused by: Unable to resolve handlereg-with-derby/1.0.0.SNAPSHOT: missing requirement [handlereg-with-derby/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=handlereg-web-frontend; type=karaf.feature [caused by: Unable to resolve handlereg-web-frontend/1.0.0.SNAPSHOT: missing requirement [handlereg-web-frontend/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.handlereg.web.frontend; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT: missing requirement [no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT] osgi.ee; filter:="(osgi.ee=UNKNOWN)"]]]

The cure for this issue is moving to the newest version of
maven-bundle-plugin, ie. 4.2.0
 https://stackoverflow.com/a/51155158

And version 4.2.0 of maven-bundle-plugin does the right thing in the
manifest.mf. The require-capabilities header looks like this:
 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"

However, usign maven-bundle-plugin 4.2.0 makes my webapp fail.  The web
context fails in start.

Does anyone know if this there are known issues with maven-bundle-plugin 4.2.0
(or 4.1.0, which fails in the same way) and the web whiteboard...?

Here are the error messages from karaf.log, that occurs on startup when
the application has been build using maven-bundle-plugin 4.1.0 or 4.2.0:
2019-06-30T22:07:49,585 | ERROR | features-3-thread-1 | HttpServiceStarted               | 142 - org.ops4j.pax.web.pax-web-runtime - 7.2.10 | Could not start the servlet context for context path [authservice]
java.lang.NullPointerException: null
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:394) ~[?:?]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852) ~[?:?]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[?:?]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerFilter(HttpServiceStarted.java:628) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerFilter(HttpServiceStarted.java:600) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerFilter(HttpServiceProxy.java:212) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.element.FilterWebElement.register(FilterWebElement.java:61) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:199) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
        at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
        at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
2019-06-30T22:07:49,594 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.hk2.locator/2.5.0.b42
2019-06-30T22:07:49,599 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.jersey.inject.jersey-hk2/2.27.0
2019-06-30T22:07:49,602 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.hk2.api/2.5.0.b42
2019-06-30T22:07:49,603 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   javax.ws.rs-api/2.1.0
2019-06-30T22:07:49,604 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   no.priv.bang.handlereg.web.api/1.0.0.SNAPSHOT
2019-06-30T22:07:49,751 | WARN  | features-3-thread-1 | handlereg                        | 101 - org.eclipse.jetty.util - 9.4.18.v20190429 | unavailable
java.lang.NullPointerException: null
        at org.glassfish.hk2.utilities.ServiceLocatorUtilities.addClasses(ServiceLocatorUtilities.java:435) ~[?:?]
        at org.glassfish.hk2.utilities.ServiceLocatorUtilities.enablePerThreadScope(ServiceLocatorUtilities.java:107) ~[?:?]
        at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createLocator(AbstractHk2InjectionManager.java:116) ~[?:?]
        at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.<init>(AbstractHk2InjectionManager.java:86) ~[?:?]
        at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.<init>(ImmediateHk2InjectionManager.java:62) ~[?:?]
        at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory$Hk2InjectionManagerStrategy$1.createInjectionManager(Hk2InjectionManagerFactory.java:79) ~[?:?]
        at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory.create(Hk2InjectionManagerFactory.java:97) ~[?:?]
        at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:93) ~[?:?]
        at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) ~[?:?]
        at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) ~[?:?]
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) ~[?:?]
        at no.priv.bang.handlereg.web.api.HandleregWebApi.init(HandleregWebApi.java:68) ~[?:?]
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) ~[?:?]
        at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[53:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1536) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:913) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:428) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:423) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:422) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:316) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:121) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:188) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
        at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
        at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
2019-06-30T22:07:49,767 | ERROR | features-3-thread-1 | WebApplication                   | 139 - org.ops4j.pax.web.pax-web-extender-whiteboard - 7.2.10 | Registration skipped for [ServletWebElement{mapping=DefaultServletMapping{httpContextId=handlereg,urlPatterns=[/api/*],initParams={jersey.config.server.provider.packages=no.priv.bang.handlereg.web.api.resources},servlet=no.priv.bang.handlereg.web.api.HandleregWebApi@74fef0ff, alias=null, servletNamehandleregapi}}] due to error during registration
java.lang.RuntimeException: javax.servlet.ServletException: handleregapi@e739392e==no.priv.bang.handlereg.web.api.HandleregWebApi,jsp=null,order=-1,inst=false,async=false
        at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1453) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1536) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:913) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:428) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:423) ~[?:?]
        at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:422) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:316) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:121) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
        at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:188) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
        at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
        at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
        at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: javax.servlet.ServletException: handleregapi@e739392e==no.priv.bang.handlereg.web.api.HandleregWebApi,jsp=null,order=-1,inst=false,async=false
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:692) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[?:?]
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[?:?]
        ... 62 more
Caused by: java.lang.NullPointerException
        at org.glassfish.hk2.utilities.ServiceLocatorUtilities.addClasses(ServiceLocatorUtilities.java:435) ~[?:?]
        at org.glassfish.hk2.utilities.ServiceLocatorUtilities.enablePerThreadScope(ServiceLocatorUtilities.java:107) ~[?:?]
        at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createLocator(AbstractHk2InjectionManager.java:116) ~[?:?]
        at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.<init>(AbstractHk2InjectionManager.java:86) ~[?:?]
        at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.<init>(ImmediateHk2InjectionManager.java:62) ~[?:?]
        at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory$Hk2InjectionManagerStrategy$1.createInjectionManager(Hk2InjectionManagerFactory.java:79) ~[?:?]
        at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory.create(Hk2InjectionManagerFactory.java:97) ~[?:?]
        at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:93) ~[?:?]
        at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) ~[?:?]
        at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) ~[?:?]
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) ~[?:?]
        at no.priv.bang.handlereg.web.api.HandleregWebApi.init(HandleregWebApi.java:68) ~[?:?]
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) ~[?:?]
        at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[?:?]
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[?:?]
        ... 62 more
2019-06-30T22:07:49,779 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT
2019-06-30T22:07:49,785 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 | Done.

Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

Steinar Bang
>>>>> Steinar Bang <[hidden email]>:

> In my quest to get my webapps ported from openjdk-8 to openjdk-11 I've
> run into the issue, with "requirement missing osgi.ee=UNKNOWN", ie:
>  org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=handlereg-with-derby; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=handlereg-with-derby)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))" [caused by: Unable to resolve handlereg-with-derby/1.0.0.SNAPSHOT: missing requirement [handlereg-with-derby/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=handlereg-web-frontend; type=karaf.feature [caused by: Unable to resolve handlereg-web-frontend/1.0.0.SNAPSHOT: missing requirement [handlereg-web-frontend/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.handlereg.web.frontend; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT: missing requirement [no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT] osgi.ee; filter:="(osgi.ee=UNKNOWN)"]]]

> The cure for this issue is moving to the newest version of
> maven-bundle-plugin, ie. 4.2.0
>  https://stackoverflow.com/a/51155158

> And version 4.2.0 of maven-bundle-plugin does the right thing in the
> manifest.mf. The require-capabilities header looks like this:
>  Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"

> However, usign maven-bundle-plugin 4.2.0 makes my webapp fail.  The web
> context fails in start.

> Does anyone know if this there are known issues with maven-bundle-plugin 4.2.0
> (or 4.1.0, which fails in the same way) and the web whiteboard...?

> Here are the error messages from karaf.log, that occurs on startup when
> the application has been build using maven-bundle-plugin 4.1.0 or 4.2.0:

Sorry! Wrong first log message.

This is the first error after karaf startup:
 https://gist.github.com/steinarb/d0b6972df59e4d51a9292756fb5f3ef1

Then a while later, comes the failure to start the servlet context:
 https://gist.github.com/steinarb/e4f7eb493733c1d09261affe5bbc6411

There is something weird going on with the web whiteboard.  Perhaps I
should look into upgrading pax-web...?

Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

Steinar Bang
>>>>> Steinar Bang <[hidden email]>:

> There is something weird going on with the web whiteboard.  Perhaps I
> should look into upgrading pax-web...?

I bumped the compile time dependencies of pax-web from 6.0.3 (which is
kindof ancient) to the newest stable 7.3.3, but it didn't make any
difference.

And looking at the feature files there doesn't seem to be any feature
file changes from this, because I'm depending on the scr feature which
is provided at runtime by karaf.

I'm currently using karaf 4.2.6 (on openjdk-11).

Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

jbonofre
In reply to this post by Steinar Bang
Hi Steinar,

by webapp, you mean a web application bundle I guess, right ?

I added karaf-servlet-example in Karaf distribution using
maven-bundle-plugin 4.2.0 with Java 11 (Oracle), and it works fine.

Maybe you can share a simple test case similar to your webapp that I can
test locally.

Regards
JB

On 30/06/2019 22:10, Steinar Bang wrote:

> In my quest to get my webapps ported from openjdk-8 to openjdk-11 I've
> run into the issue, with "requirement missing osgi.ee=UNKNOWN", ie:
>  org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=handlereg-with-derby; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=handlereg-with-derby)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))" [caused by: Unable to resolve handlereg-with-derby/1.0.0.SNAPSHOT: missing requirement [handlereg-with-derby/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=handlereg-web-frontend; type=karaf.feature [caused by: Unable to resolve handlereg-web-frontend/1.0.0.SNAPSHOT: missing requirement [handlereg-web-frontend/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=no.priv.bang.handlereg.web.frontend; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT: missing requirement [no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT] osgi.ee; filter:="(osgi.ee=UNKNOWN)"]]]
>
> The cure for this issue is moving to the newest version of
> maven-bundle-plugin, ie. 4.2.0
>  https://stackoverflow.com/a/51155158
>
> And version 4.2.0 of maven-bundle-plugin does the right thing in the
> manifest.mf. The require-capabilities header looks like this:
>  Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
>
> However, usign maven-bundle-plugin 4.2.0 makes my webapp fail.  The web
> context fails in start.
>
> Does anyone know if this there are known issues with maven-bundle-plugin 4.2.0
> (or 4.1.0, which fails in the same way) and the web whiteboard...?
>
> Here are the error messages from karaf.log, that occurs on startup when
> the application has been build using maven-bundle-plugin 4.1.0 or 4.2.0:
> 2019-06-30T22:07:49,585 | ERROR | features-3-thread-1 | HttpServiceStarted               | 142 - org.ops4j.pax.web.pax-web-runtime - 7.2.10 | Could not start the servlet context for context path [authservice]
> java.lang.NullPointerException: null
> at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:394) ~[?:?]
> at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852) ~[?:?]
> at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[?:?]
> at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerFilter(HttpServiceStarted.java:628) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerFilter(HttpServiceStarted.java:600) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerFilter(HttpServiceProxy.java:212) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.element.FilterWebElement.register(FilterWebElement.java:61) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:199) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
> at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
> at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
> at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
> at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
> at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
> at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
> at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
> at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
> at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
> 2019-06-30T22:07:49,594 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.hk2.locator/2.5.0.b42
> 2019-06-30T22:07:49,599 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.jersey.inject.jersey-hk2/2.27.0
> 2019-06-30T22:07:49,602 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   org.glassfish.hk2.api/2.5.0.b42
> 2019-06-30T22:07:49,603 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   javax.ws.rs-api/2.1.0
> 2019-06-30T22:07:49,604 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   no.priv.bang.handlereg.web.api/1.0.0.SNAPSHOT
> 2019-06-30T22:07:49,751 | WARN  | features-3-thread-1 | handlereg                        | 101 - org.eclipse.jetty.util - 9.4.18.v20190429 | unavailable
> java.lang.NullPointerException: null
> at org.glassfish.hk2.utilities.ServiceLocatorUtilities.addClasses(ServiceLocatorUtilities.java:435) ~[?:?]
> at org.glassfish.hk2.utilities.ServiceLocatorUtilities.enablePerThreadScope(ServiceLocatorUtilities.java:107) ~[?:?]
> at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createLocator(AbstractHk2InjectionManager.java:116) ~[?:?]
> at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.<init>(AbstractHk2InjectionManager.java:86) ~[?:?]
> at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.<init>(ImmediateHk2InjectionManager.java:62) ~[?:?]
> at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory$Hk2InjectionManagerStrategy$1.createInjectionManager(Hk2InjectionManagerFactory.java:79) ~[?:?]
> at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory.create(Hk2InjectionManagerFactory.java:97) ~[?:?]
> at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:93) ~[?:?]
> at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) ~[?:?]
> at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) ~[?:?]
> at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) ~[?:?]
> at no.priv.bang.handlereg.web.api.HandleregWebApi.init(HandleregWebApi.java:68) ~[?:?]
> at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) ~[?:?]
> at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[53:javax.servlet-api:3.1.0]
> at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
> at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
> at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1536) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:913) ~[99:org.eclipse.jetty.servlet:9.4.18.v20190429]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:428) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:423) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:422) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:316) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:121) ~[140:org.ops4j.pax.web.pax-web-jetty:7.2.10]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:188) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
> at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
> at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
> at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
> at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
> at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
> at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
> at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
> at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
> at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
> 2019-06-30T22:07:49,767 | ERROR | features-3-thread-1 | WebApplication                   | 139 - org.ops4j.pax.web.pax-web-extender-whiteboard - 7.2.10 | Registration skipped for [ServletWebElement{mapping=DefaultServletMapping{httpContextId=handlereg,urlPatterns=[/api/*],initParams={jersey.config.server.provider.packages=no.priv.bang.handlereg.web.api.resources},servlet=no.priv.bang.handlereg.web.api.HandleregWebApi@74fef0ff, alias=null, servletNamehandleregapi}}] due to error during registration
> java.lang.RuntimeException: javax.servlet.ServletException: handleregapi@e739392e==no.priv.bang.handlereg.web.api.HandleregWebApi,jsp=null,order=-1,inst=false,async=false
> at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1453) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1536) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:913) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:428) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$2.call(JettyServerImpl.java:423) ~[?:?]
> at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:422) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:316) ~[?:?]
> at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:121) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
> at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:188) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193) ~[?:?]
> at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
> at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
> at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
> at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
> at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) ~[?:?]
> at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) ~[?:?]
> at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) ~[?:?]
> at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) ~[?:?]
> at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) ~[?:?]
> at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) ~[?:?]
> at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
> at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) ~[?:?]
> at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[?:?]
> at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) ~[?:?]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) ~[?:?]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) ~[?:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
> Caused by: javax.servlet.ServletException: handleregapi@e739392e==no.priv.bang.handlereg.web.api.HandleregWebApi,jsp=null,order=-1,inst=false,async=false
> at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:692) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[?:?]
> at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
> at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
> at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[?:?]
> ... 62 more
> Caused by: java.lang.NullPointerException
> at org.glassfish.hk2.utilities.ServiceLocatorUtilities.addClasses(ServiceLocatorUtilities.java:435) ~[?:?]
> at org.glassfish.hk2.utilities.ServiceLocatorUtilities.enablePerThreadScope(ServiceLocatorUtilities.java:107) ~[?:?]
> at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createLocator(AbstractHk2InjectionManager.java:116) ~[?:?]
> at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.<init>(AbstractHk2InjectionManager.java:86) ~[?:?]
> at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.<init>(ImmediateHk2InjectionManager.java:62) ~[?:?]
> at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory$Hk2InjectionManagerStrategy$1.createInjectionManager(Hk2InjectionManagerFactory.java:79) ~[?:?]
> at org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory.create(Hk2InjectionManagerFactory.java:97) ~[?:?]
> at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:93) ~[?:?]
> at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282) ~[?:?]
> at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335) ~[?:?]
> at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178) ~[?:?]
> at no.priv.bang.handlereg.web.api.HandleregWebApi.init(HandleregWebApi.java:68) ~[?:?]
> at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370) ~[?:?]
> at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:671) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:428) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) ~[?:?]
> at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) ~[?:?]
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:?]
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
> at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) ~[?:?]
> at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734) ~[?:?]
> at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744) ~[?:?]
> at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1449) ~[?:?]
> ... 62 more
> 2019-06-30T22:07:49,779 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 |   no.priv.bang.handlereg.web.frontend/1.0.0.SNAPSHOT
> 2019-06-30T22:07:49,785 | INFO  | features-3-thread-1 | FeaturesServiceImpl              | 11 - org.apache.karaf.features.core - 4.2.6 | Done.
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

jbonofre
In reply to this post by Steinar Bang
Karaf 4.2.6 already use the correct pax-web version (7.2.x) working with
Java 11.

All karaf itests on Jenkins and on my machine are running with Java 11,
including the servlet and web ones.

Regards
JB

On 30/06/2019 23:04, Steinar Bang wrote:

>>>>>> Steinar Bang <[hidden email]>:
>
>> There is something weird going on with the web whiteboard.  Perhaps I
>> should look into upgrading pax-web...?
>
> I bumped the compile time dependencies of pax-web from 6.0.3 (which is
> kindof ancient) to the newest stable 7.3.3, but it didn't make any
> difference.
>
> And looking at the feature files there doesn't seem to be any feature
> file changes from this, because I'm depending on the scr feature which
> is provided at runtime by karaf.
>
> I'm currently using karaf 4.2.6 (on openjdk-11).
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

Steinar Bang
In reply to this post by jbonofre
>>>>> Jean-Baptiste Onofré <[hidden email]>:

> Hi Steinar,
> by webapp, you mean a web application bundle I guess, right ?

Well, my webapps actually consists of several bundles, that are loaded
by a karaf feature, usually:
 1. A service bundle, defining the services of the business logic, and
    an application specific database plugin interface
 2. A liquibase database schema bundle
 3. A database plugin bundle (I usually have one for derby and one for
    PostgreSQL ans select either at runtime)
 4. A business logic bundle providing the service defined in the
    service bundle
 5. A web.security bundle defining the web context using web whiteboard
    (this is my first failure in karaf.log), and adding a shiro filter
    to the web whiteboard and the web context
 6. A web.api bundle creating REST services for the services provided by
    the business logic bundle (item #4 above) and plugging a servlet
    into the web context defined in item #5 using web whiteboard
 7. a web.frontend plugging a servlet into the web context defined in
    item #5 using web whiteboard

So basically 3 bundles plugging into the web whiteboard, together with
several support bundles (database and business logic).

Examples of webapps following this pattern:
 https://github.com/steinarb/authservice
 https://github.com/steinarb/ukelonn
 https://github.com/steinarb/handlereg

The top level, hand written, feature files pulling the complete webapp in:
 https://github.com/steinarb/authservice/blob/master/src/main/filtered-resources/feature.xml#L16
 https://github.com/steinarb/ukelonn/blob/master/karaf/src/main/filtered-resources/feature.xml#L16
 https://github.com/steinarb/handlereg/blob/master/src/main/filtered-resources/feature.xml#L16

> I added karaf-servlet-example in Karaf distribution using
> maven-bundle-plugin 4.2.0 with Java 11 (Oracle), and it works fine.

> Maybe you can share a simple test case similar to your webapp that I can
> test locally.

Hm, yes, maybe...?

Most of my sample projects use the web whiteboard, but don't define a
web context (which is what was failing for me according to the
karaf.log), but this project defines both a web context and uses apache
shiro:
 https://github.com/steinarb/authservice-sampleclient

I'll see how it works out.

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Known issues with maven-bundle-plugin 4.1.0 and 4.2.0

Steinar Bang
In reply to this post by jbonofre
>>>>> Jean-Baptiste Onofré <[hidden email]>:

> Karaf 4.2.6 already use the correct pax-web version (7.2.x) working with
> Java 11.

> All karaf itests on Jenkins and on my machine are running with Java 11,
> including the servlet and web ones.

As it turns out, I may have been too clever for my own good...? :-)

I thought this would be a good way to avoid eclipse warnings,
independent of whether I was running on a java 8 JRE or a java 11 JRE:
 https://github.com/steinarb/handlereg/blob/05f067463533abba399432d25913face62986add/pom.xml#L614

Compiling with the java 11, gave me this in the require-capability
header of the manifest.mf:
 osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"

If I understand the explanation of osgi.ee, this means that the bundle
required that all of its dependencies was fulfilled from bundles with
byte code versions of java 11 or later...?

In any case: removing the profile settings and always use
 <source>1.8</source>
 <target>1.8</target>
got the bundle loading again.