8wDlpd.png
8wDFp9.png
8wDEOx.png
8wDMfH.png
8wDKte.png

WSO2 文件入站端点错误 - org.apache.commons.vfs2.FileSystemException:无法确定文件类型

Dan Choi 2月前

26 0

我正在尝试使用 inboundEndpoint 读取 FTP 位置中的文件,并且该位置包含扩展名为 .swf 的文件。以下是我的入站端点

我正在尝试使用 inboundEndpoint 读取 FTP 位置中的文件,并且该位置包含扩展名为 .swf 的文件。以下是我的入站端点

<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="file-inbound-endpoint" onError="file-inbound-endpoint-fault-sequence" protocol="file" sequence="file-inbound-endpoint-in-sequence" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
    <parameters>
      <parameter name="interval">10000</parameter>
      <parameter name="sequential">true</parameter>
      <parameter name="coordination">true</parameter>
      <parameter name="transport.vfs.ActionAfterProcess">NONE</parameter>
      <parameter name="transport.vfs.FileURI">ftp://{username}:{password}@{ip_address}/{location-path}</parameter>
      <parameter name="transport.vfs.FileNamePattern">.*\.swf</parameter> 
      <parameter name="transport.vfs.ContentType">text/plain</parameter> 
    </parameters>
</inboundEndpoint>

此位置有 2 个文件,例如 test1.swf 和 test2.swf。我想以纯文本形式读取它们。但是当我将它们部署到 wso2 mi 4.0.0 中时,我收到以下错误,

ERROR {FilePollingConsumer} - Error checking for existence and readability : ftp://{username}:{password}@{ip_address}/{location-path} org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "ftp://{username}:{password}@{ip_address}/{location-path}".
2024-08-05T11:37:16.218092415Z  at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1291)
2024-08-05T11:37:16.218096635Z  at org.apache.commons.vfs2.provider.AbstractFileObject.exists(AbstractFileObject.java:889)
2024-08-05
T11:37:16.218099403Z    at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.poll(FilePollingConsumer.java:168)
2024-08-05T11:37:16.218102131Z  at org.wso2.carbon.inbound.endpoint.protocol.file.FilePollingConsumer.execute(FilePollingConsumer.java:132)
2024-08-05T11:37:16.218104831Z  at org.wso2.carbon.inbound.endpoint.protocol.file.FileTask.taskExecute(FileTask.java:45)
2024-08-05T11:37:16.218107902Z  at org.wso2.carbon.inbound.endpoint.common.InboundTask.execute(InboundTask.java:43)
2024-08-05T11:37:16.218110501Z  at org.wso2.micro.integrator.mediation.ntask.NTaskAdapter.execute(NTaskAdapter.java:105)
2024-08-05T11:37:16.218113096Z  at org.wso2.micro.integrator.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:63)
2024-08-05T11:37:16.218115888Z  at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
2024-08-05T11:37:16.218118549Z  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2024-08-05T11:37:16.218121145Z  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2024-08-05T11:37:16.218123689Z  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2024-08-05T11:37:16.218126403Z  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2024-08-05T11:37:16.218129021Z  at java.base/java.lang.Thread.run(Thread.java:829)
2024-08-05T11:37:16.218149900Z Caused by: java.net.SocketException: Connection reset
2024-08-05T11:37:16.218152728Z  at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
2024-08-05T11:37:16.218155411Z  at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
2024-08-05T11:37:16.218157966Z  at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
2024-08-05T11:37:16.218160531Z  at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
2024-08-05T11:37:16.218163067Z  at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
2024-08-05T11:37:16.218166304Z  at java.base/
java.io.InputStreamReader.read(InputStreamReader.java:181)
2024-08-05T11:37:16.218168941Z  at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
2024-08-05T11:37:16.218171541Z  at java.base/java.io.BufferedReader.read(BufferedReader.java:182)
2024-08-05T11:37:16.218174112Z  at org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:58)
2024-08-05T11:37:16.218176798Z  at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:313)
2024-08-05T11:37:16.218179337Z  at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:292)
2024-08-05T11:37:16.218181871Z  at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:503)
2024-08-05T11:37:16.218184387Z  at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:628)
2024-08-05T11:37:16.218187016Z  at org.apache.commons.net.ftp.FTP.port(FTP.java:952)
2024-08-05T11:37:16.218189525Z  at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:842)
2024-08-05T11:37:16.218192130Z  at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:789)
2024-08-05T11:37:16.218194926Z  at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3404)
2024-08-05T11:37:16.218197510Z  at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3334)
2024-08-05T11:37:16.218200062Z  at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:3011)
2024-08-05T11:37:16.218202620Z  at org.apache.commons.vfs2.provider.ftp.AbstractFtpClientWrapper.listFilesInDirectory(AbstractFtpClientWrapper.java:110)
2024-08-05T11:37:16.218205349Z  at org.apache.commons.vfs2.provider.ftp.AbstractFtpClientWrapper.listFiles(AbstractFtpClientWrapper.java:102)
2024-08-05T11:37:16.218207987Z  at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:122)
2024-08-05T11:37:16.218210559Z  at org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:96)
2024-08-05T11:37:16.218213134Z  at org.apache.commons.vfs2.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:164)
2024-08-05T11:37:16
.218215674Z     at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetType(FtpFileObject.java:272)
2024-08-05T11:37:16.218218240Z  at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1285)
2024-08-05T11:37:16.218224308Z  ... 13 more

请注意,这里我只是删除了 IP、用户名和密码,但这些插入是正确的,你能帮我解决这个问题吗?

帖子版权声明 1、本帖标题:WSO2 文件入站端点错误 - org.apache.commons.vfs2.FileSystemException:无法确定文件类型
    本站网址:http://xjnalaquan.com/
2、本网站的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
3、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
4、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
5、站长邮箱:yeweds@126.com 除非注明,本帖由Dan Choi在本站《file》版块原创发布, 转载请注明出处!
最新回复 (0)
返回
作者最近主题: