WSO2 Enterprise Integrator v6.1.1在使用VFS移动文件时生成锁定文件

时间:2018-01-10 12:13:29

标签: wso2 wso2esb wso2carbon vfs wso2ei

我正在使用 WSO2 Enterprise Integrator 6.1.1。我正在使用VFS从一个目录轮询文件并转移到另一个目录。但我的代理服务正在制作一个锁文件,无法移动文件。我最初认为这是一个文件权限问题,但当我尝试使用入站端点或我在代理服务中调用的自定义java中介时。然后文件成功移动。

锁定文件:

enter image description here

代理服务代码:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="TestCSVFileMoving"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="vfs">
   <target>
      <inSequence>
         <log level="full"
              separator=",========----------Test CSV File Proxy Triggered------======="/>
      </inSequence>
      <faultSequence/>
   </target>
   <parameter name="transport.vfs.Streaming">true</parameter>
   <parameter name="transport.PollInterval">30</parameter>
   <parameter name="transport.vfs.FileURI">vfs:file:///files/uploads</parameter>
   <parameter name="transport.vfs.ContentType">text/plain</parameter>
   <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
   <parameter name="transport.vfs.MoveAfterFailure">vfs:file:///opt/file/con/Fail</parameter>
   <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
   <parameter name="transport.vfs.FileNamePattern">Test.*.csv</parameter>
   <parameter name="transport.vfs.MoveAfterProcess">vfs:file:///opt/file/con/Out</parameter>
   <description/>
</proxy>

错误日志:

TID: [-1234] [] [2018-01-10 12:51:56,634] ERROR {org.apache.synapse.transport.vfs.VFSTransportListener} -  File object 'file:///files/uploads/Test.csv'cloud not be moved, will remain in "locked" state {org.apache.synapse.transport.vfs.VFSTransportListener}
org.apache.axis2.AxisFault: Error moving file : file:///files/uploads/Test.csv to file:///opt/file/con/Out
    at org.apache.axis2.transport.base.AbstractTransportListener.handleException(AbstractTransportListener.java:343)
    at org.apache.synapse.transport.vfs.VFSTransportListener.moveOrDeleteAfterProcessing(VFSTransportListener.java:682)
    at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:499)
    at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188)
    at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134)
    at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not rename "file:///files/uploads/Test.csv" because it is read-only.
    at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1087)
    at org.apache.synapse.transport.vfs.VFSTransportListener.moveOrDeleteAfterProcessing(VFSTransportListener.java:680)
    ... 8 more

问题陈述:

我的问题是,在错误日志中,它清楚地表明它是一个只读文件。但为什么通过使用入站端点和调用自定义中介我能够移动文件。但是仅使用VFS我收到此错误?还有什么方法可以解决它。如果我必须使用VFS。

0 个答案:

没有答案