File Poller -->Router -->Bean .FileComponentError processing exchangeInOnly
sanjayk Oct 14, 2009 10:46 AMHello FUSE Community,
I have a scenario which is explained below.I am using FUSE 3.3.1.18 version.
1) File Poller component polls for files from a specified folder and then sends the polled files to Router(servicemix-camel) component.
2) Router then sends the file to servicemix-bean component
3) Bean component processes the incoming xml and inserts into database and does ftp send.
4) I am sending DONE status to channel using below code in Bean component's MessageExchangeListener implementation class.
exchange.setStatus(ExchangeStatus.DONE);
channel.send(exchange);
5) File Poller then archives the file to archive location specified in xbean.xml.
Every thing is working fine if I don't have Router in between File Poller and Bean component.
Like File Poller --> Bean(database,ftp call explicitly)
If I introduce Router in between File Poller and Bean component then I am getting below mentioned error. And the file is not archived.
Please help me in resolving this issue... I think I am missing some key configuration setting( may be MEP!!! )
~~~~~~~~~~~~~~~~~~~~~~
:-1:-1: Premature end of file.
ERROR - FileComponent - Error processing exchange InOnly[
id: ID:102.54.42.143-1244ff8bc1a-8:5
status: Done
role: consumer
service: MyFILERouter
endpoint: camel102-54-42-143-1244ff8bc1a-24-0
in: Unable to display: org.xml.sax.SAXParseException: Premature end of file.
]
java.io.IOException: Failed to move C:\docs\resources\SamplePoller\Sample.xml to C:\docs\resources\poller\archive
at org.apache.servicemix.file.FilePollerEndpoint.moveFile(FilePollerEndpoint.java:515)
at org.apache.servicemix.file.FilePollerEndpoint.process(FilePollerEndpoint.java:443)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:540)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:514)
at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:183)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - FileComponent - Error setting exchange status to ERROR
javax.jbi.messaging.MessagingException: illegal call to send / sendSync
at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:614)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:386)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:432)
at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:183)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks,
Sanjay