Hi, Did you find a way to do this? I've been trying to do something similar, i.e. create a shared processor and use it in sevaral SUs and get the same problem as you.
Anyone else have any idea whether this is possible? I've tried setting all the dependencies to <provided> 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-tp26734312p27026607.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
