Servicemix-camel component already the camel-core, if you put it in to the shard lib and use it in the servicemix-camel su.
I don't know which which jar will be load first :(

Willem


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?

Reply via email to