ClassNotFoundException:在具有嵌入式cxf依赖项的OSGi捆绑包中找不到org.glassfish.jersey.internal.RuntimeDelegateImpl [英] ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl cannot be found in OSGi bundle which has embedded cxf dependencies

查看:77
本文介绍了ClassNotFoundException:在具有嵌入式cxf依赖项的OSGi捆绑包中找不到org.glassfish.jersey.internal.RuntimeDelegateImpl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与 jax-rs-2-0-change-默认实现我有一个包含cxf 2.7.8和openejb的OSGi软件包.cxf依赖项被添加为嵌入式依赖项.

This is relate to the jax-rs-2-0-change-default-implementation I'm having an OSGi bundle which consist of cxf 2.7.8 as well as openejb. cxf dependencies are added as embedded dependencies.

当我尝试部署Web应用程序时,出现以下异常.当我在启动服务器时将系统属性设置为 -Djavax.ws.rs.ext.RuntimeDelegate = org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl 时,即可解决.

When I try to deploy a webapp I'm getting the below exception. When I set the system property when starting the server as -Djavax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl this can be solved.

但是在上面的链接中它说当我有 org.apache.cxf的 META-INF/services/javax.ws.rs.ext.RuntimeDelegate 文件时.jaxrs.impl.RuntimeDelegateImpl 可以解决.

But in the above link it says that when I have the META-INF/services/javax.ws.rs.ext.RuntimeDelegate file with the content as org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl this can be solved.

在我的OSGi捆绑包中,该文件存在于 cxf-rt-frontend-jaxrs-2.7.8.jar 中,但是此jar嵌入OSGi捆绑包中,似乎无法正确选择.我试图将相同的文件添加到OSGi捆绑包 META-INF/services 中,但是它也不起作用.

In my OSGi bundle that file exist in the cxf-rt-frontend-jaxrs-2.7.8.jar But this jar is embedded in the OSGi bundle seems that is not getting pick correctly. I tried to add the same file to the OSGi bundle META-INF/services but it didn't work either.

有人可以告诉我是否有一种无需手动设置系统属性就可以摆脱这种情况的方法? java.lang.Class.forName0(本地方法)处的java.lang.ExceptionInInitializerError(com.sun.proxy.$ Proxy89.处的java.lang.Class.forName(Class.java:191)处的< clinit>(未知来源)位于sun.reflect.NativeConstructorAccessorImpl.newInstance0(本地方法)位于sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)位于sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)org.apache上java.lang.reflect.Proxy.newInstance(Proxy.java:764)上的reflect.Constructor.newInstance(Constructor.java:526)org.apache上的java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755)org.apache.openejb.server.cxf.rs.CxfRSService.contextCDIIntegration(CxfRSService.java:111)上的.openejb.server.cxf.rs.CxfRSService $ ContextBean.< init>(CxfRSService.java:192).apache.openejb.server.cxf.rs.CxfRSService.integrateCDIAndJaxRsInjections(CxfRSService.java:100)位于sun.reflect.NativeMethodAccessorImp在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)处的l.invoke0(本机方法)在java.lang.reflect.Method.invoke(方法.org.apache.openejb.observer.ObserverManager $ MethodInvocation.invoke(ObserverManager.java:400)处org.apache.openejb.observer.ObserverManager.doFire(ObserverManager.java:111)处org.apache.openejborg.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:134)上的.observer.ObserverManager.fireEvent(ObserverManager.java:100)在org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150))在org.apache.openejb.assembler的org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:838)的org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)处.org.apache.tomee.catalina.TomcatWebAppB上的classic.Assembler.createApplication(Assembler.java:644)uilder.startInternal(TomcatWebAppBuilder.java:1250)位于sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor43)在org.wso2.carbon.javaee.tomee.ASTomcatWebAppBuilder.configureStart(ASTomcatWebAppBuilder.java:127)在java.lang.reflect.Method.invoke(Method.java:606)在org.apache.tomee.catalina.GlobalListenerSupportorg.wso2.carbon.javaee.tomee.ASGlobalListenerSupport.lifecycleEvent(ASGlobalListenerSupport.java:74)上的.lifecycleEvent(GlobalListenerSupport.java:130)在org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)上位于org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)的org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)(位于org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)的org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)的org.apache.catalina.core.StandardHost.在org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:345)处的addChild(StandardHost.java:649)在org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:190)中的addChild(StandardHost.java:649)在org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:345)在org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:257)在org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:207)在org.org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:139)上的.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:174)在org.wso2.carbon.webapp.mgde(AbstractWebappDeployer..java:204)在组织位于org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)的.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:111)位于org.apache.axis2.deployment.repositoryorg.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)上的.util.DeploymentFileData.deploy(DeploymentFileData.java:136)在org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList).java:144),位于org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377),位于org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254),位于org.apache.axis2.org.wso2.carbon.core.internal.DeploymentServerStartupObserver.completingServerStartup(DeploymentServerStartupObserver.java:org.wso2.carbon.core.CarbonAxisConfigurator.deployServices(CarbonAxisConfigurator.java:567)处的deployment.DeploymentEngine.loadServices(DeploymentEngine.java:135)51)在org.wso2.carbon.core.internal.CarbonCororg.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:235)上的org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:185)处的eServiceComponent.notifyBefore(CarbonCoreServiceComponent.java:235)288),位于org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107),位于org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)上的.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)在org.eclipse.osgi.internal.serviceregistry.ServiceRegistryorg.eclipse上的.publishServiceEventPrivileged(ServiceRegistry.java:819)(位于org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)于org.eclipseorg.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)上的.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)org.eclipse.osgi.framework.internal.coreorg.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)处的.BundleContextImpl.registerService(BundleContextImpl.java:433)在org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.registerThrottlingAgent(ThrottlingAgentServiceComponent.java:123)在org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.activate(ThrottlingAgentServiceComponent.java:100)在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57),位于组织机构的java.lang.reflect.Method.invoke(Method.java:606),位于sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)在org.eclipse.equinox处的.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)上的org.eclipse.equinox.internal.ds.InstanceProcess上的.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)的.buildComponents(InstanceProcess.java:197)org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222))在org.eclipse的org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)的org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)处.org.eclipse.osgi.framework.even上的osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)位于org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)的tmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)位于org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.于org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)处的org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)处的java.771)org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.register:java.451)上的.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)位于org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCor)处的.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:517)eServiceComponent.java:91)at sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.activate(Service.java:260)在org.eclipse.equinox.internal.ds.model处的.lang.reflect.Method.invoke(Method.java:606)在org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess)处的.ServiceComponentProp.activate(ServiceComponentProp.java:146)在org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)在org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620),位于org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197),位于org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343).org.eclipse.osgi.in上的eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)处的ternal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)在org.eclipse.osgi.framework.eventmgr.EventManager处.org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)上的org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)上的dispatchEvent(EventManager.java:230)在org.eclipse.osgi.internal上的org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)上的org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)上的.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)在org.eclipse.equinox.http.servlet.internorg.eclipse.equinox处的al.Activator.registerHttpService(Activator.java:81).org.eclipse.equinox.http.servlet.internal.ProxyServlet处的http.servlet.internal.Activator.addProxyServlet(Activator.java:60)org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)处的init(ProxyServlet.java:40)org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)处的init(ProxyServlet.java:40)在org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)在org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)在org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262)在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550)在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)在org.apache.org.apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1565)上的catalina.core.ContainerBase $ StartChild.call(ContainerBase.java:1575)在JAVjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)上的a.util.concurrent.FutureTask.run(FutureTask.java:262)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run(Thread.java:745)原因:java.lang.RuntimeException:java.lang.ClassNotFoundException:org.glassfish.jersey.internal.RuntimeDelegateImpl不能被tomee_1.7.2.SNAPSHOT_wso2v1找到在javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:151)在javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:119)在javax.ws.rs.core.EntityTag.< clinit>(EntityTag.java:56)... 131多原因:java.lang.ClassNotFoundException:org.glassfish.jersey.internal.RuntimeDelegateImpl在org.eclipse.osgi.internal上的tomee_1.7.2.SNAPSHOT_wso2v1无法找到org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)的.loader.BundleLoader.findClassInternal(BundleLoader.java:501)位于org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)的se.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)在java.lang.ClassLoader.loadClass(ClassLoader.java:358)at java.lang.Class.forName0(本机方法)at java.lang.Class.forName(Class.java:191)at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:114)在javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:207)处在javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:134)... 133更多

Can someone tell me is there a way to get rid of this without manually setting the system property? java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at com.sun.proxy.$Proxy89.<clinit>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.reflect.Proxy.newInstance(Proxy.java:764) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755) at org.apache.openejb.server.cxf.rs.CxfRSService$ContextBean.<init>(CxfRSService.java:192) at org.apache.openejb.server.cxf.rs.CxfRSService.contextCDIIntegration(CxfRSService.java:111) at org.apache.openejb.server.cxf.rs.CxfRSService.integrateCDIAndJaxRsInjections(CxfRSService.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke(ObserverManager.java:400) at org.apache.openejb.observer.ObserverManager.doFire(ObserverManager.java:111) at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:100) at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:134) at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150) at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:838) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:644) at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1250) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.wso2.carbon.javaee.tomee.ASTomcatWebAppBuilder.configureStart(ASTomcatWebAppBuilder.java:127) at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130) at org.wso2.carbon.javaee.tomee.ASGlobalListenerSupport.lifecycleEvent(ASGlobalListenerSupport.java:74) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:345) at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:190) at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:257) at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:207) at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:174) at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:139) at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:204) at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:111) at org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:135) at org.wso2.carbon.core.CarbonAxisConfigurator.deployServices(CarbonAxisConfigurator.java:567) at org.wso2.carbon.core.internal.DeploymentServerStartupObserver.completingServerStartup(DeploymentServerStartupObserver.java:51) at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.notifyBefore(CarbonCoreServiceComponent.java:235) at org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.completeInitialization(StartupFinalizerServiceComponent.java:185) at org.wso2.carbon.core.internal.StartupFinalizerServiceComponent.serviceChanged(StartupFinalizerServiceComponent.java:288) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451) at org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.registerThrottlingAgent(ThrottlingAgentServiceComponent.java:123) at org.wso2.carbon.throttling.agent.internal.ThrottlingAgentServiceComponent.activate(ThrottlingAgentServiceComponent.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:517) at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219) at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) at org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81) at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40) at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl cannot be found by tomee_1.7.2.SNAPSHOT_wso2v1 at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:151) at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:119) at javax.ws.rs.core.EntityTag.<clinit>(EntityTag.java:56) ... 131 more Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl cannot be found by tomee_1.7.2.SNAPSHOT_wso2v1 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:114) at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:207) at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:134) ... 133 more

推荐答案

能够在此处找到答案:

Was able to find the answer here: https://wso2.org/jira/browse/WSAS-1870

基本上,您需要添加一个系统属性来设置默认委托:

Basically you need to add a system property for setting the default delegate:

javax.ws.rs.ext.RuntimeDelegate = org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl

javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl

这篇关于ClassNotFoundException:在具有嵌入式cxf依赖项的OSGi捆绑包中找不到org.glassfish.jersey.internal.RuntimeDelegateImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆