Hi Josh I've done a clean build of the DOSGI trunk, and tested both multi and single distributions. For a multi one I did :
java -jar plugins\org.eclipse.osgi_3.5.0.v20090520.jar -console -configuration\dosgi_conf then installed a greeter_rest interface bundle and then an impl one (updated Activator to use HTTP Service and a '/my' context) and it worked ok. A single bundle distribution was also ok. Can you please run Equinox with a '-clean' flag and do a clean trunk build after updating it ? Note I'm running Equinox on Windows but it should not make a difference. If the problem still persists then may be you can try to do 1. mvn eclipse:eclipse in the dosgi trunk and import the generated projects into a workspace 2. start Equinox with -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 And then in your workspace start a remote debugging session and add a breakpoint to JaxRSHttpServiceConfigurationTypeHandler...Perhaps it can help. But I'm hoping that cleaning the Equinox cache can solve this issue... Let me know please if you can make it working Thanks, Sergey -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Josh Holtzman Sent: 22 September 2009 22:25 To: [email protected] Subject: Re: WebApplicationException not found by DOSGi If I start the multi bundle distribution without any of my code, everything starts up just fine. The moment I deploy a bundle with this activator, I get the following exception: public class Activator implements BundleActivator { public void start(BundleContext context) throws Exception { Dictionary props = new Hashtable(); props.put("service.exported.interfaces", MyRestService.class.getName()); props.put("service.exported.configs", "org.apache.cxf.rs"); props.put("org.apache.cxf.rs.httpservice.context", "/my"); context.registerService(MyRestService.class.getName(), new MyRestService(), props); } public void stop(BundleContext context) throws Exception {} } INFO: Successfully registered CXF DOSGi servlet at /my [pool-1-thread-4] INFO org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandl er - Successfully registered CXF DOSGi servlet at /my Exception in thread "pool-1-thread-4" java.lang.NoClassDefFoundError: javax/ws/rs/WebApplicationException at org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandl er.createServer(JaxRSHttpServiceConfigurationTypeHandler.java:76) at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHook Utils.java:86) at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHoo k.java:106) at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublish Hook.java:80) at org.apache.cxf.dosgi.dsw.Activator$1.run(Activator.java:164) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto r.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:908) at java.lang.Thread.run(Thread.java:637) Caused by: java.lang.ClassNotFoundException: javax.ws.rs.WebApplicationException at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceBy Delegation(ModuleImpl.java:618) at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl .java:59) at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loa dClass(ModuleImpl.java:1446) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402) ... 8 more Likewise, starting up the single bundle distribution without any of my code is fine. However, when I try to start my simple bundle named cxf-issue-0.1-SNAPSHOT.jar (containing the activator described above), I get the following: -> start file:/cxf-issue-0.1-SNAPSHOT.jar ... WARNING: WARNING : Problem creating a remote endpoint for org.opencastproject.cxfissue.MyRestService from CXF PublishHook, reason is null org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBea n.java:112) at org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandl er.createServer(JaxRSHttpServiceConfigurationTypeHandler.java:100) at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHook Utils.java:86) at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHoo k.java:106) at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublish Hook.java:80) at org.apache.cxf.dosgi.dsw.Activator$1.run(Activator.java:164) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto r.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:908) at java.lang.Thread.run(Thread.java:637) Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAX RSFactoryBean.java:226) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBea n.java:77) ... 8 more Thanks for any ideas you can think of. I'll keep investigating. Josh On Tue, Sep 22, 2009 at 1:59 PM, Sergey Beryozkin <[email protected]>wrote: > Also, does it with with both multii-bundle and single-bundle distributions > ? > > thanks, Sergey > > ----- Original Message ----- From: "Sergey Beryozkin" < > [email protected]> > To: <[email protected]> > Sent: Tuesday, September 22, 2009 12:32 PM > > Subject: Re: WebApplicationException not found by DOSGi > > > Hi Josh >> >> CXF trunk has been updated to use a jax-rs 1.1 api but >> cxf-dosgi-ri-dsw-cxf-1.1-SNAPSHOT depends on cxf 2.2.4. >> So does it look like as if the real cause of the missing >> WebApplicationException exception is that no WSPolicyFeatureBeanInfo can be >> loaded ? It is strange... >> >> Is there any chance that you have other JAX-RS implementations loaded as >> well ? >> >> thanks, Sergey >> >> >> >> ----- Original Message ----- From: "Josh Holtzman" < >> [email protected]> >> To: <[email protected]> >> Sent: Tuesday, September 22, 2009 11:26 AM >> Subject: Re: WebApplicationException not found by DOSGi >> >> >> It looks like the classloader is not able to load >>> org.apache.cxf.ws.policy.WSPolicyFeatureBeanInfo, in case that rings any >>> bells. >>> >>> Josh >>> >>> >>> On Tue, Sep 22, 2009 at 9:31 AM, Josh Holtzman <[email protected] >>> >wrote: >>> >>> For some reason, cxf-dosgi-ri-dsw-cxf-1.1-SNAPSHOT.jar has stopped >>>> starting >>>> up. Has something changed in the last couple of days? FWIW, the JSR311 >>>> bundle is running: >>>> >>>> [ 40] [Active ] [ 2] Apache ServiceMix Specs :: JSR311 API 1.0 >>>> (1.3.0) >>>> >>>> Thanks, >>>> Josh >>>> >>>> org.osgi.framework.BundleException: Activator start error in bundle >>>> cxf-dosgi-ri-dsw-cxf [47]. >>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1506) >>>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779) >>>> at >>>> >>>> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.ja va:105) >>>> at >>>> >>>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Ac tivator.java:291) >>>> at >>>> >>>> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java :177) >>>> at java.lang.Thread.run(Thread.java:637) >>>> Caused by: java.lang.NoClassDefFoundError: >>>> javax/ws/rs/WebApplicationException >>>> at >>>> >>>> org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandl er.createServer(JaxRSHttpServiceConfigurationTypeHandler.java:76) >>>> at >>>> >>>> org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceHook Utils.java:86) >>>> at >>>> >>>> org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublishHoo k.java:106) >>>> at >>>> >>>> org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPublish Hook.java:80) >>>> at >>>> >>>> org.apache.cxf.dosgi.dsw.Activator.checkExistingServices(Activator.java: 151) >>>> at org.apache.cxf.dosgi.dsw.Activator.start(Activator.java:81) >>>> at >>>> >>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction .java:589) >>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1458) >>>> >>>> >>>> >>> >> >
