Forum Home » FUSE Products » FUSE Mediation Router

Thread: NoClassDefFoundErrors with AggregationStrategy and others

 
This question is answered.


Permlink Replies: 3 - Last Post: Jul 18, 2009 5:44 PM Last Post By: fribeiro
fribeiro

Posts: 3
Registered: 05/13/09
NoClassDefFoundErrors with AggregationStrategy and others
Posted: Jul 15, 2009 6:44 PM
 
  Click to reply to this thread Reply

All,

I'm getting NoClassDefFoundError when trying to use org.apache.camel.processor.aggregate.AggregationStrategy in my routes, as well as instantiating other classes in org.apache.camel.processor.* packages, in 4.1.0.1.

Does anyone know which descriptor would need to be changed, if any, to make these packages visible to the class loader in question?

Thanks.
fribeiro

Posts: 3
Registered: 05/13/09
Re: NoClassDefFoundErrors with AggregationStrategy and others
Posted: Jul 15, 2009 6:59 PM   in response to: fribeiro in response to: fribeiro
 
  Click to reply to this thread Reply
After removing "<scope>provided</scope>" from my POM and including the service-camel dependency, as instructed, I got instead a LinkageError saying that both the SU class loader and the class loader for org.apache.camel.model.ProcessorType have different Class objects for the type org.apache.camel.processor.aggregate.AggregationStrategy.
njiang

Posts: 218
Registered: 09/17/07
Re: NoClassDefFoundErrors with AggregationStrategy and others
Posted: Jul 16, 2009 2:02 AM   in response to: fribeiro in response to: fribeiro
Correct
  Click to reply to this thread Reply
I'm confused, if you are using ServiceMix 4.1.0.1 , you'd better wrap your camel-context into the OSGi bundle instead of using SMX3's SU way.

Even SMX4 supports SMX3's service assembly, but you still have chance to get into the ClassLoader issue, so I suggest you take a look at the SMX4's camel example to try the new way.
fribeiro

Posts: 3
Registered: 05/13/09
Re: NoClassDefFoundErrors with AggregationStrategy and others
Posted: Jul 18, 2009 5:44 PM   in response to: fribeiro in response to: fribeiro
 
  Click to reply to this thread Reply
I've migrated my Camel applications out of service-camel and got them to work as expected.

I didn't migrate my HTTP applications out of servicemix-http, though, and think we need a better replacement for its SOAP endpoints, CXF applications + camel-nmr, for example, is too much work.

Thanks for the help.