cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From K Fung <kfung4...@gmail.com>
Subject Re: How to contribue a CXF JAX-RS OSGi Sample?
Date Sat, 19 Nov 2011 17:20:50 GMT
Hi Sergey,

I've updated CXF-3859 with my newest iteration of the code :-)

Here is what has changed in this version...

+ Removed use of java.net repository as mail.jar is no longer a required
dependency
+ Bump version to 2.5.1-SNAPSHOT
+ Use org.codehaus.mojo:exec-maven-plugin instead of run.*
+ Updated README based on the above
++ To compile the sample, use mvn package
++ To run the sample, use mvn integration-test

Here are my replies to some of your comments in this month-long old
thread...

+ The Apache snapshot repository remains there to ease development; it'll
be removed in the final version
+ Yes, it does indeed seem like wsdl4j is no longer a required dependency
on the server runtime side
+ I could not remove the usage of SampleServlet. When I use just the base
servlet, I get the following exception (which may be resolved by using
JAXRSFactory directly but that's against the JSR-311 standard)

javax.servlet.ServletException: No Application class
minimalosgi.SampleApplication can be found
        at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.loadClass(CXFNonSpringJaxrsServlet.java:365)
        at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.createServerFromApplication(CXFNonSpringJaxrsServlet.java:345)
        at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:78)
        at
org.apache.felix.http.base.internal.handler.ServletHandler.init(ServletHandler.java:55)
        at
org.apache.felix.http.base.internal.handler.HandlerRegistry.addServlet(HandlerRegistry.java:65)
        at
org.apache.felix.http.base.internal.service.HttpServiceImpl.registerServlet(HttpServiceImpl.java:95)
        at minimalosgi.Activator$1.addingService(Activator.java:58)
        at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
        at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
        at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
        at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
        at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
        at minimalosgi.Activator.start(Activator.java:77)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
        at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Caused by: java.lang.ClassNotFoundException: minimalosgi.SampleApplication
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at
org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:259)
        at
org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:245)
        at
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.loadClass(CXFNonSpringJaxrsServlet.java:363)
        ... 23 more

Here is where I'm focusing the next round of improvements on...

+ Check if code compiles correctly in Java 5 (this one is currently
stumping me, I'll need to see how ServiceMix makes it work in Java 5)
+ Remove excess repositories from the pom.xml
+ Parent pom.xml should compile JAX-RS OSGi sample
+ Any others?

Regards,
kl

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message