You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jcamus <jc...@parkeon.com> on 2009/03/24 15:49:18 UTC

FilePoller must process valid xml file otherwise problem!

Hi !
I noticed the following problem with ServiceMix and FilePoller. 
If the filepoller treat a given file (which is an incorrect .xml file), the
flow sent by the filepoller is lost!

When I try the simple following architecture :

FilePoller ->  FileSender (just writing the file received)
(*.xml file)

If file is NOT correct (for exemple a plain text file named toto.xml), I
have the following error :

WARN  - FileComponent                  - Message in file
tbz\in\incoming\bad_stat.xml could not be handled successfully: javax.xml
.transform.TransformerException: java.io.IOException: Stream closed
javax.jbi.messaging.MessagingException:
javax.xml.transform.TransformerException: java.io.IOException: Stream closed
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageContent(DefaultFileMarshaler.java:153)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessage(DefaultFileMarshaler.java:82)
        at
org.apache.servicemix.file.FileSenderEndpoint.processInOnly(FileSenderEndpoint.java:86)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:102)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.transform.TransformerException: java.io.IOException:
Stream closed
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:505)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransformer.java:125)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageContent(DefaultFileMarshaler.java:151)
        ... 14 more
Caused by: java.io.IOException: Stream closed
        at
java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:241)
        at
org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown
Source)
        at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)

How can I find a simple solution to prevent that? I mean, filepoller must be
able to detect if xml is correct (if not file must be sent in ko for example
and not treated).... The solution to have a BinaryFileMarshaller in the
filepoller is not valid (because I need to treat by default xml file).

I am very very annoyed with this problem... can you help me?

Regards
-- 
View this message in context: http://www.nabble.com/FilePoller-must-process-valid-xml-file-otherwise-problem%21-tp22682084p22682084.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.