Hi all,
I am trying to get camel working in osgi. I wrote a simple bundle that
starts up a camel context in it´s activator. I also created a target
platform with hopefully all necessary bundles.
In my context exchanges are created in a file endpoint and should be
converted to string. There I get the exception:
---
No type converter available to convert from type:
org.apache.camel.component.file.GenericFile to the required type:
java.lang.String
An idea what I did wrong?
Greetings
Christian
---
My Activator start method:
public void start(BundleContext context) throws Exception {
DefaultCamelContext ccontext = new DefaultCamelContext();
ccontext.addRoutes(new RouteBuilder() {
public void configure() throws Exception {
from("file://d:/test").convertBodyTo(String.class).process(new Processor() {
public void process(Exchange exchange) throws Exception {
System.out.println(exchange);
}
});
}
});
ccontext.start();
}
-------------
My Manifest:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Cameltest
Bundle-SymbolicName: cameltest
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: cameltest.Activator
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.apache.camel.camel-core;bundle-version="2.3.0",
org.apache.camel.camel-spring-osgi;bundle-version="2.3.0"
----------
My bundles in Equinox:
ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.6.0.v20100422-1745
1 ACTIVE org.springframework.core_2.5.6.A
4 ACTIVE org.springframework.osgi.io_1.2.1
6 ACTIVE org.springframework.transaction_2.5.6.A
7 ACTIVE com.springsource.org.aopalliance_1.0.0
9 ACTIVE org.apache.camel.camel-spring-osgi_2.3.0.SNAPSHOT
12 ACTIVE org.springframework.context_2.5.6.A
13 ACTIVE org.springframework.beans_2.5.6.A
14 ACTIVE org.springframework.osgi.core_1.2.1
17 ACTIVE org.apache.camel.camel-core_2.3.0.SNAPSHOT
19 ACTIVE commons-management_1.0.0
20 ACTIVE org.springframework.aop_2.5.6.A
22 ACTIVE com.springsource.org.apache.commons.logging_1.1.1
23 ACTIVE cameltest_1.0.0.qualifier
--
----
http://www.liquid-reality.de