aspose file tools*
The moose likes Other Open Source Projects and the fly likes Using org.apache.camel.Exchange Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Using org.apache.camel.Exchange" Watch "Using org.apache.camel.Exchange" New topic
Author

Using org.apache.camel.Exchange

Claire Chan Myae
Greenhorn

Joined: Nov 21, 2013
Posts: 8
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

Joined: Mar 07, 2010
Posts: 1666
    
    7

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.



[How To Ask Questions][Read before you PM me]
Claire Chan Myae
Greenhorn

Joined: Nov 21, 2013
Posts: 8
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using org.apache.camel.Exchange