Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-962

servicemix-ftp:java.net.SocketException: Software caused connection abort: recv failed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      OS:Windows 2003
      JDK:JDK 1.6.0_25
      ServiceMix:4.3
      Remote FTP Server:IIS

      Description

      Remote Server: Windows 2003 + IIS
      Local Server : Windows 2003  JDK1.6.0_25  ServiceMix 4.3 + servicemix-ftp 2011.01
      Event : Download files from remote server.

      CN:
      刚开始,启动bundle的时候出现错误,提示java.util.NoSuchElementException: Could not create a validated object, cause: org.apache.commons.net.ftp.FTPClient.setReaderThread。
      在新版的commons-net2.2中,FTPClient没有继承TelnetClient,没有setReaderThread方法,所以出现如前文所示的错误信息。
      使用两种方式解决:
          1.把servicemix-ftp依赖的commons-net/commons-net/2.2改成org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net/1.4.1_5。
          2.安装org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net/1.4.1_5,并在bundle中引入此版本的包。

      通过上面两种方法的其中一种,bundle可以启动,一般情况下,文件也可以下载,但是会出现下面的异常。

      EN:
      At first, Occour exception on starting bundle,prompt"java.util.NoSuchElementException: Could not create a validated object, cause: org.apache.commons.net.ftp.FTPClient.setReaderThread".
      Check new version "commons-net 2.2", the FTPClinet not extends from TelnetClient, it without "setReaderThread" Method, so happen this exception.
      using to solutions to resolve this problem:
          solution 1.Change "servicemix-ftp" feature's dependent "commons-net/commons-net/2.2" to "org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net/1.4.1_5"(in file "${apache-servicemix-4.3.0}/system/org/apache/servicemix/apache-servicemix/4.3.0/apache-servicemix-4.3.0-features.xml" about "servicemix-ftp" section).
          solution 2.install "org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-net/1.4.1_5", and import package for this version(Import-Package: org.apache.commons.net.ftp;version="[1.4,2)").

      use any solution, the bundle can be started.currently the files will be downloaded. but sometimes will occour new exception(look stack),it may effect fild download.

      Stack:

      java.net.SocketException: Software caused connection abort: recv failed
      at java.net.SocketInputStream.socketRead0(Native Method)[:1.6.0_25]
      at java.net.SocketInputStream.read(SocketInputStream.java:129)[:1.6.0_25]
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)[:1.6.0_25]
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)[:1.6.0_25]
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)[:1.6.0_25]
      at java.io.InputStreamReader.read(InputStreamReader.java:167)[:1.6.0_25]
      at java.io.BufferedReader.fill(BufferedReader.java:136)[:1.6.0_25]
      at java.io.BufferedReader.readLine(BufferedReader.java:299)[:1.6.0_25]
      at java.io.BufferedReader.readLine(BufferedReader.java:362)[:1.6.0_25]
      at org.apache.commons.net.ftp.FTPFileEntryParserImpl.readNextEntry(FTPFileEntryParserImpl.java:95)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.commons.net.ftp.FTPListParseEngine.readStream(FTPListParseEngine.java:150)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.commons.net.ftp.FTPListParseEngine.readServerList(FTPListParseEngine.java:98)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2396)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2364)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)[158:org.apache.servicemix.bundles.commons-net:1.4.1.5]
      at org.apache.servicemix.ftp.FtpPollerEndpoint.listFiles(FtpPollerEndpoint.java:434)[160:servicemix-ftp:2011.01.0]
      at org.apache.servicemix.ftp.FtpPollerEndpoint.pollFileOrDirectory(FtpPollerEndpoint.java:403)[160:servicemix-ftp:2011.01.0]
      at org.apache.servicemix.ftp.FtpPollerEndpoint.pollFileOrDirectory(FtpPollerEndpoint.java:420)[160:servicemix-ftp:2011.01.0]
      at org.apache.servicemix.ftp.FtpPollerEndpoint.pollFileOrDirectory(FtpPollerEndpoint.java:396)[160:servicemix-ftp:2011.01.0]
      at org.apache.servicemix.ftp.FtpPollerEndpoint.poll(FtpPollerEndpoint.java:103)[160:servicemix-ftp:2011.01.0]
      at org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:207)[121:servicemix-common:2011.01.0]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25]
      at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              luowenqiang luowenqiang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: