You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Lars Heinemann (JIRA)" <ji...@apache.org> on 2008/12/05 00:32:05 UTC

[jira] Resolved: (SM-1715) Using File Poller with Archive attribute fails when file with same name has been previously used

     [ https://issues.apache.org/activemq/browse/SM-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Heinemann resolved SM-1715.
--------------------------------

    Resolution: Fixed

There is now a check if a file already exists inside archive folder. If not, everything is done as before.
If the file already exists in archive folder, the file name will be changed to the following format:

<System.currentTimeMillis()>_<Filename>

For example:  1228433027884_MyFile.xml

That naming should guarantee to be unique.

> Using File Poller with Archive attribute fails when file with same name has been previously used
> ------------------------------------------------------------------------------------------------
>
>                 Key: SM-1715
>                 URL: https://issues.apache.org/activemq/browse/SM-1715
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-file
>    Affects Versions: servicemix-file-2008.01, 3.3
>         Environment: Windows XP, jdk1.6.0_07
>            Reporter: Stefaan Ferket
>            Assignee: Lars Heinemann
>             Fix For: servicemix-file-2008.02
>
>
> We tried using the archive attribute in file poller.
> This will work fine when no file with the same name exist in the archive directory. 
> It'll fail if a file with the same name already exists in the archive directory:
> java.io.IOException: Failed to QC080819_2.QAN to archive
> 	at org.apache.servicemix.file.FilePollerEndpoint.moveFile(FilePollerEndpoint.java:436)
> 	at org.apache.servicemix.file.FilePollerEndpoint.process(FilePollerEndpoint.java:377)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
> 	at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:571)
> 	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:621)
> 	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)
> 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.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:525)
> 	at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
> 	at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:621)
> 	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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.