Hi George,
OK I see. I guess that your SU contains:
- your route builder (pure Java)
- your camel-context.xml file (in resources)
Have you try to use the <classLoaderDelegation/> tag in your SU's pom.xml ?
Regards
JB
On 06/08/2010 10:55 AM, georgemc wrote:
Hi Jean-Batiste,
Thanks for the reply. Unfortunately, I'm talking about a Camel SU, there is
no XBean configuration.
rgds
George
Jean-Baptiste Onofré wrote:
Hi,
Could you provide your pom.xml and xbean.xml ?
Could we have the complete stack trace ?
Basicly, to define self-first delegation, you need:
- to add<classLoaderDelegation>self-first</classLoaderDelegation> in
your SU's pom.xml
- to add<classpath inverse="true"/> in your xbean.xml
FYI, you have several ways to extend a SU classloader, take a look on:
http://servicemix.apache.org/classloaders.html
Regards
JB
On 06/07/2010 09:31 PM, georgemc wrote:
Hi
I've seen this problem brushed upon in a few previous posts, but never
actually resolved as far as I can tell. As the title suggests, I can't
persuade a Camel service-unit to load its own classes. Specifically,
Servicemix is providing old versions of spring-core and spring-beans and
loading dependencies from them before my SU gets a chance to, with
tedious
NoSuchMethodError results. I've tried with various versions of Servicemix
3.2.x and 3.3.x to no avail, and as many versions of Camel as I can eat.
Whatever configuration of dependencies I use in Maven, nothing works.
I've
unpacked every SU to see if the rogue jars are there, and they're not.
I'm
sure this is a classloading problem, but I have no idea how to solve it.
Anybody got any ideas? Moving to Servicemix 4 is not an option
thanks for looking
--
Jean-Baptiste Onofré
---------------------------------
HomePage
http://www.nanthrax.net
---------------------------------
Contacts
[email protected]
[email protected]
---------------------------------
OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086