karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Otasek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5508) Error using OSGi JAX RS Connector in Java 9
Date Fri, 01 Dec 2017 15:39:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274525#comment-16274525
] 

David Otasek commented on KARAF-5508:
-------------------------------------

It appears to work now! Thanks for the timely update.

I didn't get a test case assembled that would demonstrate the previous error. I'll keep compiling
with the SNAPSHOT build, and if it arises again, I'll revisit it.

> Error using OSGi JAX RS Connector in Java 9
> -------------------------------------------
>
>                 Key: KARAF-5508
>                 URL: https://issues.apache.org/jira/browse/KARAF-5508
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.2.0.M1
>         Environment: Ubuntu 16.04
> Java build 9.0.1+11
> Karaf is built from SNAPSHOT using pax_web_jetty 6.0.9 and Jetty 9.3.21.v20170918
>            Reporter: David Otasek
>            Assignee: Freeman Fang
>
> When using the OSGi JAX-RS Connector in my application, I get an error trying to register
the GSON provider:
> {code}
> 14:15:54.022 [pool-15-thread-1] ERROR Felix - Bundle com.eclipsesource.jaxrs.publisher
[181] EventDispatcher: Error during dispatch. (java.lang.IllegalArgumentException)
> java.lang.IllegalArgumentException: null
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isInterfaceAssignable(BundleAssignableClassFinder.java:180)
~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isClassAcceptable(BundleAssignableClassFinder.java:105)
~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isClassAcceptable(BundleAssignableClassFinder.java:125)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanDirectory(BundleClassFinder.java:257)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanBundleClassPath(BundleClassFinder.java:228)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.find(BundleClassFinder.java:112)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.findAllClasses(BundleClassFinder.java:183)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanImportPackages(BundleClassFinder.java:198)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.find(BundleClassFinder.java:106)
~[?:?]
> 	at org.ops4j.pax.web.utils.ServletContainerInitializerScanner.scanBundles(ServletContainerInitializerScanner.java:118)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:284)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:209)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:190)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:388)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:311)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:120)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:245)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:221)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:205)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:65)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerServlet(JerseyContext.java:159)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerApplication(JerseyContext.java:137)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerServletWhenNotAlreadyRegistered(JerseyContext.java:129)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.addResource(JerseyContext.java:76)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.registerResource(JAXRSConnector.java:189)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.registerResource(JAXRSConnector.java:171)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.doAddResource(JAXRSConnector.java:165)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.addResource(JAXRSConnector.java:159)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.delegateAddService(ResourceTracker.java:46)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:40)
~[?:?]
> 	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.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
~[?:?]
> 	at com.eclipsesource.jaxrs.provider.gson.internal.Activator.start(Activator.java:17)
~[?:?]
> 	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
~[?:?]
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240) ~[?:?]
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:2146) ~[?:?]
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
> 	at org.cytoscape.rest.internal.task.OSGiJAXRSManager.installBundlesFromResources(OSGiJAXRSManager.java:203)
~[?:?]
> 	at org.cytoscape.rest.internal.task.OSGiJAXRSManager.installOSGiJAXRSBundles(OSGiJAXRSManager.java:134)
~[?:?]
> 	at org.cytoscape.rest.internal.CyActivator.lambda$start$0(CyActivator.java:146) ~[?:?]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) [?:?]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [?:?]
> 	at java.lang.Thread.run(Thread.java:844) [?:?]
> 14:15:54.074 [FelixDispatchQueue] ERROR com.eclipsesource.jaxrs.publisher - FrameworkEvent
ERROR - com.eclipsesource.jaxrs.publisher
> java.lang.IllegalArgumentException: null
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.objectweb.asm.ClassReader.<init>(Unknown Source) ~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isInterfaceAssignable(BundleAssignableClassFinder.java:180)
~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isClassAcceptable(BundleAssignableClassFinder.java:105)
~[?:?]
> 	at org.apache.xbean.finder.BundleAssignableClassFinder.isClassAcceptable(BundleAssignableClassFinder.java:125)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanDirectory(BundleClassFinder.java:257)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanBundleClassPath(BundleClassFinder.java:228)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.find(BundleClassFinder.java:112)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.findAllClasses(BundleClassFinder.java:183)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanImportPackages(BundleClassFinder.java:198)
~[?:?]
> 	at org.apache.xbean.osgi.bundle.util.BundleClassFinder.find(BundleClassFinder.java:106)
~[?:?]
> 	at org.ops4j.pax.web.utils.ServletContainerInitializerScanner.scanBundles(ServletContainerInitializerScanner.java:118)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:284)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:209)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:190)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:388)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:311)
~[?:?]
> 	at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:120)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:245)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:221)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:205)
~[?:?]
> 	at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:65)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerServlet(JerseyContext.java:159)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerApplication(JerseyContext.java:137)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.registerServletWhenNotAlreadyRegistered(JerseyContext.java:129)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JerseyContext.addResource(JerseyContext.java:76)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.registerResource(JAXRSConnector.java:189)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.registerResource(JAXRSConnector.java:171)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.doAddResource(JAXRSConnector.java:165)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.JAXRSConnector.addResource(JAXRSConnector.java:159)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.delegateAddService(ResourceTracker.java:46)
~[?:?]
> 	at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:40)
~[?:?]
> 	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.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
~[?:?]
> 	at com.eclipsesource.jaxrs.provider.gson.internal.Activator.start(Activator.java:17)
~[?:?]
> 	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
~[?:?]
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240) ~[?:?]
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:2146) ~[?:?]
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
> 	at org.cytoscape.rest.internal.task.OSGiJAXRSManager.installBundlesFromResources(OSGiJAXRSManager.java:203)
~[?:?]
> 	at org.cytoscape.rest.internal.task.OSGiJAXRSManager.installOSGiJAXRSBundles(OSGiJAXRSManager.java:134)
~[?:?]
> 	at org.cytoscape.rest.internal.CyActivator.lambda$start$0(CyActivator.java:146) ~[?:?]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) ~[?:?]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) ~[?:?]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) ~[?:?]
> 	at java.lang.Thread.run(Thread.java:844) [?:?]
> {code}
> This appears very similar to the issue reported here: [https://issues.apache.org/jira/browse/KARAF-5399]
> Running under Java 8 works with no errors or warnings.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message