• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using org.apache.camel.Exchange

 
Claire Chan Myae
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I used org.apache.camel.Exchange to modify my body but I got following error:

Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/camel/Exchange

is there something I still need to define or add jar before I used Exchange?

Thanks,
Claire
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

This question is not really about Spring so I will move it for you. However at first glance it appears the library with the class you having issue with is camel-core. Also make sure that all of your camel jars are the same version.

 
Claire Chan Myae
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank you for the pointer. Following is my java using exchange to modify message body of a file.

package com.beans.test;

import org.apache.camel.Exchange;

public class ProcessHeader {
public void processExchange(Exchange exchange) {
// Do whatever you like to 'exchange'...
exchange.getIn().setBody("Here is a new message body!");
}
}


I have added jar name camel-core-2.10.0.redhat-60024.jar but no luck the problem is still exist. how do i resloved this.

Do I have to add
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.12.1</version>
</dependency>

Thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic