I'd like to do something similar, have a custom processor in a shared library, but hit the same problem. Is there a way to do this as I don't want to have to copy/paste the processors everywhere?
Thanks. jweathers777 wrote: > > I have written a Camel Processor class that I would like to use multiple > Camel service units defined in different service assemblies in my > ServiceMix project. My project is currently successfully using a Shared > Library for some other shared classes and resource files. > > However, when I add the class to the shared library and then deploy the > various service assemblies, I consistently get errors from the > AutoDeploymentService when ServiceMix attempts to deploy a Camel service > unit that depends upon the derived Processor class: > Error creating bean with name 'camelContext': Invocation of init > method failed; nested exception is java.lang.NoClassDefFoundError: > org/apache/camel/Processor > > My service units have camel context definitions like the following: > <camelContext id="camelContext" useJmx="true" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <package>com.my.package</package> > </camelContext> > > <classpath> > <library>my-sl</library> > </classpath> > > and in my shared library POM, I've added a dependecy for Camel Core as > follows: > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-core</artifactId> > <version>1.6.1.2-fuse</version> > </dependency> > > What could be going on here to cause the Camel service unit's class loader > to fail to find org.apache.camel.Processor? Also, what is the proper role > of a shared library? Is it a place to put common libraries, classes, and > resources that are meant to be shared across service units and service > assemblies? > -- View this message in context: http://old.nabble.com/Classpath-Problems-w--Camel-Based-Class-In-Shared-Library-tp26734312p27026582.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
