Hi all,
I am trying to run the camel-example-osgi sample (for both Camel 2.5 and 2.6). It runs with a "timer", "log", "bean" or "file" endpoint, but when I change the endpoint to "ftp", and install the bundle, it immediately dumps out a type not present exception.
Sample Code:
<osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="ftp://test@localhost?password=test&binary=true&consumer.delay=30000"/>
<to uri="file://usr/local/test"/>
</route>
</osgi:camelContext>
I have the following features installed in Fuse 4.3.1:
karaf@root> features:list | grep -v uninstall
State Version Name Repository
installed http://5.4.2-fuse-01-00 activemq activemq-5.4.2-fuse-01-00
installed http://5.4.2-fuse-01-00 activemq-blueprint activemq-5.4.2-fuse-01-00
installed http://2.3.2-fuse-00-00 cxf repo-0
installed http://2011.01.0-fuse-00-00 servicemix-shared repo-0
installed http://2011.01.0-fuse-00-00 servicemix-cxf-bc repo-0
installed http://2011.01.0-fuse-00-00 servicemix-file repo-0
installed http://2011.01.0-fuse-00-00 servicemix-ftp repo-0
installed http://2011.01.0-fuse-00-00 servicemix-http repo-0
installed http://2011.01.0-fuse-00-00 servicemix-jms repo-0
installed http://2011.01.0-fuse-00-00 servicemix-mail repo-0
installed http://2011.01.0-fuse-00-00 servicemix-bean repo-0
installed http://2011.01.0-fuse-00-00 servicemix-camel repo-0
installed http://2011.01.0-fuse-00-00 servicemix-drools repo-0
installed http://2011.01.0-fuse-00-00 servicemix-cxf-se repo-0
installed http://2011.01.0-fuse-00-00 servicemix-eip repo-0
installed http://2011.01.0-fuse-00-00 servicemix-osworkflow repo-0
installed http://2011.01.0-fuse-00-00 servicemix-quartz repo-0
installed http://2011.01.0-fuse-00-00 servicemix-scripting repo-0
installed http://2011.01.0-fuse-00-00 servicemix-validation repo-0
installed http://2011.01.0-fuse-00-00 servicemix-saxon repo-0
installed http://2011.01.0-fuse-00-00 servicemix-wsn2005 repo-0
installed http://2011.01.0-fuse-00-00 servicemix-snmp repo-0
installed http://2011.01.0-fuse-00-00 servicemix-vfs repo-0
installed http://2011.01.0-fuse-00-00 servicemix-smpp repo-0
installed http://2011.01.0-fuse-00-00 servicemix-exec repo-0
installed http://4.3.1-fuse-00-00 activemq-broker repo-0
installed http://1.4.0-fuse-00-00 naming repo-0
installed http://0.2-incubating transaction repo-0
installed http://1.4.0-fuse-00-00 document repo-0
installed http://1.4.0-fuse-00-00 nmr repo-0
installed http://4.0.8 woodstox repo-0
installed http://1.4.0-fuse-00-00 jbi repo-0
installed http://1.4.0-fuse-00-00 jbi-cluster repo-0
installed http://3.0.5.RELEASE spring karaf-2.1.3-fuse-00-00
installed http://1.2.0 spring-dm karaf-2.1.3-fuse-00-00
installed http://2.1.3-fuse-00-00 config karaf-2.1.3-fuse-00-00
installed http://2.1.3-fuse-00-00 http karaf-2.1.3-fuse-00-00
installed http://2.1.3-fuse-00-00 war karaf-2.1.3-fuse-00-00
installed http://2.6.0-fuse-00-00 camel-core repo-0
installed http://2.6.0-fuse-00-00 camel-spring repo-0
installed http://2.6.0-fuse-00-00 camel-blueprint repo-0
installed http://2.6.0-fuse-00-00 camel-ftp repo-0
installed http://2.6.0-fuse-00-00 camel-spring-integration repo-0
And have added the follow dependency to my camel-example-osgi POM.xml:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>2.6.0</version>
<!-- use the same version as your Camel core version -->
</dependency>
I am using Maven 2.2.1 to install and build the project. I also have the Maven plug in for Eclipse.
Like I mentioned earlier, "file to file" works, but when I change it to "ftp to file", I get this stack trace:
karaf@root> osgi:install -s file:C:/apache-camel-2.6.0/examples/camel-example-osgi/target/camel-example-osgi-2.6.0.jar
Bundle ID: 223
karaf@root> Exception in thread "SpringOsgiExtenderThread-18" org.apache.camel.RuntimeCamelException: java.lang.TypeNotPresentException: Typ
e org.apache.camel.component.file.strategy.GenericFileProcessStrategyFactory class not found not present
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:237)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.
java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplication
Context.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionA
pplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.ru
n(DependencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.TypeNotPresentException: Type org.apache.camel.component.file.strategy.GenericFileProcessStrategyFactory class not foun
d not present
at org.apache.camel.component.file.GenericFileEndpoint.createGenericFileStrategy(GenericFileEndpoint.java:157)
at org.apache.camel.component.file.GenericFileEndpoint.getGenericFileProcessStrategy(GenericFileEndpoint.java:126)
at org.apache.camel.component.file.GenericFileConsumer.doStart(GenericFileConsumer.java:488)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)
at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1593)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:1859)
at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1812)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1738)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1528)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1420)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1321)
at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1299)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
... 10 more
Any suggestions would be appreciated,
Thanks,
Rob
(PS, in Camel 2.2 and 2.3, this application builds and runs with a local FTP server, however does not retrieve files from the remote server I am making a request to. The stepwise functionality from 2.6 would be nice to have.)