• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Camel integration with spring

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Team,

I am stuck with following error while configuring Camel with Spring.

find the camel context configuration below.

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring-2.10.0.xsd">

<bean id="myTstProcessor" class="com.test.camel.processor.pkg.MyProcessor">
</bean>

<camelContext xmlns="http://camel.apache.org/schema/spring">
<endpoint id="testFtp" uri="ftp://10.42.58.206/files" />
<route>
<from ref="testFtp" />
<to uri="file://E:/destFtp" />
</route>
</camelContext>

</beans>

When i deploy it on tomcat server gives following error, below is the stack trace.

INFO [localhost-startStop-1] (ContextLoader.java:194) - Root WebApplicationContext: initialization started
INFO [localhost-startStop-1] (AbstractApplicationContext.java:456) - Refreshing Root WebApplicationContext: startup date [Thu Nov 20 17:30:01 IST 2014]; root of context hierarchy
INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from class path resource [camel-context-ftp.xml]
INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:623) - Overriding bean definition for bean 'abhishekFtp': replacing [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:557) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@69af0fcf: defining beans [myTstProcessor,abhishekFtp,template,consumerTemplate,camel-1:beanPostProcessor,camel-1]; root of factory hierarchy
INFO [localhost-startStop-1] (DefaultCamelContext.java:1381) - Apache Camel 2.10.0 (CamelContext: camel-1) is starting
INFO [localhost-startStop-1] (ManagementStrategyFactory.java:43) - JMX enabled.
INFO [localhost-startStop-1] (DefaultManagementLifecycleStrategy.java:849) - StatisticsLevel at All so enabling load performance statistics
INFO [localhost-startStop-1] (DefaultTypeConverter.java:45) - Loaded 170 type converters
INFO [localhost-startStop-1] (DefaultCamelContext.java:2015) - Route: route1 started and consuming from: Endpoint[ftp://10.42.58.206/files]
INFO [localhost-startStop-1] (DefaultCamelContext.java:1416) - Total 1 routes, of which 1 is started.
INFO [localhost-startStop-1] (DefaultCamelContext.java:1417) - Apache Camel 2.10.0 (CamelContext: camel-1) started in 0.546 seconds
INFO [localhost-startStop-1] (ContextLoader.java:221) - Root WebApplicationContext: initialization completed in 2092 ms
20 Nov, 2014 5:30:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
20 Nov, 2014 5:30:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
20 Nov, 2014 5:30:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3719 ms
INFO [Camel (camel-1) thread #1 - ftp://10.42.58.206/files] (RemoteFileConsumer.java:146) - Connected and logged in to: ftp://anonymous@10.42.58.206:21
WARN [Camel (camel-1) thread #1 - ftp://10.42.58.206/files] (RemoteFilePollingConsumerPollStrategy.java:37) - Trying to recover by disconnecting from remote server forcing a re-connect at next poll: ftp://anonymous@10.42.58.206:21
WARN [Camel (camel-1) thread #1 - ftp://10.42.58.206/files] (DefaultPollingConsumerPollStrategy.java:53) - Consumer FtpConsumer[ftp://10.42.58.206/files] could not poll endpoint: Endpoint[ftp://10.42.58.206/files] caused by: Unknown parser type: WIN32
org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser type: WIN32
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:165)
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:94)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3066)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2731)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2778)
at org.apache.camel.component.file.remote.FtpOperations.listFiles(FtpOperations.java:644)
at org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:88)
at org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:51)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:107)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Please help me out in resolving this error.

Regards,
Atharva
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic