title: SFTP Java - Pipe closed Jsch Exception
body: <p>I am working on a java method to copy files from one location to another remote location. My code is as follows. I tried using <strong>jsch 0.1.42 &amp; 0.1.50 &amp; 0.1.54</strong></p>
  
  <pre><code>      public static void processFiles(ArrayList&lt;String&gt; FilesToBeCopied, String destFilePath) throws IOException {
          SftpClient client = new SftpClient("karthick");
          String keyFilePath = "/ab/c/d/id_rsa";
          String sftpUser = "karthickkb";
          client.login(sftpUser, keyFilePath, null);
          client.changeWorkingDirectory(destFilePath);
          Configuration conf = new Configuration();
          FileSystem fs = FileSystem.get(conf);
          FSDataInputStream fsdisPath = null;
          String filePath = null;
          for (String sourcefilePath : FilesToBeCopied) {
              try {
                  filePath = sourcefilePath;
                  Path inputPath = new Path(filePath);
                  fsdisPath = fs.open(inputPath);
                  BufferedInputStream bis = new BufferedInputStream(fsdisPath);
                  client.storeFile(inputPath.getName(), bis);
                  fsdisPath.close();
                  fsdisPath = null;
              } catch (Exception ex) {
                  ex.printStackTrace();
              } finally {
                  try {
                      if (client != null) {
                          client.disconnect();
  
  
          }
                  if (fsdisPath != null) {
                      fsdisPath.close();
                  }
              } catch (Exception ex) {
                  ex.printStackTrace();
              }
          }
      }
  
  }
  
  }
  </code></pre>
  
  <p>Error code when I used Jsch 0.1.42 is 
  The following error code I received when I used jsch 0.1.42.</p>
  
  <pre><code>     java.io.IOException: java.io.IOException: Pipe closed
      at org.mule.transport.sftp.SftpClient.storeFile(SftpClient.java:390)
      at karthickArchive.archiveMigration.sftpFileUtil.processFiles(sftpFileUtil.java:58)
      at karthickArchive.archiveMigration.getFileUtility.main  (getFileUtility.java:69)
  
       17/08/14 07:06:41 ERROR sftp.SftpClient: Error writing data over SFTP service, error was: java.io.IOException: Pipe closed
      4: java.io.IOException: Pipe closed
      at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:578)
      at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:439)
      at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:406)
      at org.mule.transport.sftp.SftpClient.storeFile(SftpClient.java:385)
      at karthickArchive.archiveMigration.sftpFileUtil.processFiles(sftpFileUtil.java:58)
      at karthickArchive.archiveMigration.getFileUtility.main(getFileUtility.java:69)
      Caused by: java.io.IOException: Pipe closed
      at java.io.PipedInputStream.read(PipedInputStream.java:308)
      at java.io.PipedInputStream.read(PipedInputStream.java:378)
      at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2325)
      at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2351)
      at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:474)
      ... 5 mor
  </code></pre>
  
  <p>when I use jsch 0.1.50, the error as follows</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchFieldError: identities
      at com.jcraft.jsch.UserAuthPublicKey.start(UserAuthPublicKey.java:39)
      at com.jcraft.jsch.Session.connect(Session.java:463)
      at com.jcraft.jsch.Session.connect(Session.java:183)
  </code></pre>
  
  <p>I tried to explore enough and I couldn't get a clear answer for my problem and I guess I am missing something. Any advice would be greatly appreciated. </p>
  
  <p>Maven Dependency tree when I use <strong>jsch 0.1.50</strong></p>
  
  <pre><code> [INFO] Scanning for projects...
   [INFO]                                                                         
   [INFO] ------------------------------------------------------------------------
   [INFO] Building archiveMigration 0.0.1-SNAPSHOT
   [INFO] ------------------------------------------------------------------------
   [INFO] 
   [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ archiveMigration ---
   [INFO] tdiArchive:archiveMigration:jar:0.0.1-SNAPSHOT
   [INFO] +- org.apache.hadoop:hadoop-hdfs:jar:2.5.0-cdh5.3.2:compile
   [INFO] |  +- com.google.guava:guava:jar:11.0.2:compile
   [INFO] |  |  \- (com.google.code.findbugs:jsr305:jar:1.3.9:compile - omitted for duplicate)
   [INFO] |  +- org.mortbay.jetty:jetty:jar:6.1.26.cloudera.4:compile
   [INFO] |  |  \- (org.mortbay.jetty:jetty-util:jar:6.1.26.cloudera.4:compile - omitted for duplicate)
   [INFO] |  +- org.mortbay.jetty:jetty-util:jar:6.1.26.cloudera.4:compile
   [INFO] |  +- com.sun.jersey:jersey-core:jar:1.9:compile
   [INFO] |  +- com.sun.jersey:jersey-server:jar:1.9:compile
   [INFO] |  |  +- asm:asm:jar:3.1:compile
   [INFO] |  |  \- (com.sun.jersey:jersey-core:jar:1.9:compile - omitted for duplicate)
   [INFO] |  +- commons-cli:commons-cli:jar:1.2:compile
   [INFO] |  +- commons-codec:commons-codec:jar:1.4:compile
   [INFO] |  +- commons-io:commons-io:jar:2.4:compile
   [INFO] |  +- commons-lang:commons-lang:jar:2.6:compile
   [INFO] |  +- commons-logging:commons-logging:jar:1.1.3:compile
   [INFO] |  +- commons-daemon:commons-daemon:jar:1.0.13:compile
   [INFO] |  +- javax.servlet.jsp:jsp-api:jar:2.1:compile
   [INFO] |  +- log4j:log4j:jar:1.2.17:compile
   [INFO] |  +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
   [INFO] |  +- javax.servlet:servlet-api:jar:2.5:compile
   [INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.8.8:compile
   [INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.8:compile
   [INFO] |  |  \- (org.codehaus.jackson:jackson-core-asl:jar:1.8.8:compile - omitted for duplicate)
   [INFO] |  +- tomcat:jasper-runtime:jar:5.5.23:compile
   [INFO] |  |  +- (javax.servlet:servlet-api:jar:2.4:compile - omitted for conflict with 2.5)
   [INFO] |  |  \- commons-el:commons-el:jar:1.0:compile
   [INFO] |  |     \- (commons-logging:commons-logging:jar:1.0.3:compile - omitted for conflict with 1.1.3)
   [INFO] |  +- xmlenc:xmlenc:jar:0.52:compile
   [INFO] |  \- io.netty:netty:jar:3.6.2.Final:compile
   [INFO] +- org.apache.hadoop:hadoop-common:jar:2.5.0-cdh5.3.2:compile
   [INFO] |  +- org.apache.hadoop:hadoop-annotations:jar:2.5.0-cdh5.3.2:compile
   [INFO] |  |  \- jdk.tools:jdk.tools:jar:1.6:system
   [INFO] |  +- (com.google.guava:guava:jar:11.0.2:compile - omitted for duplicate)
   [INFO] |  +- (commons-cli:commons-cli:jar:1.2:compile - omitted for duplicate)
   [INFO] |  +- org.apache.commons:commons-math3:jar:3.1.1:compile
   [INFO] |  +- (xmlenc:xmlenc:jar:0.52:compile - omitted for duplicate)
   [INFO] |  +- commons-httpclient:commons-httpclient:jar:3.1:compile
   [INFO] |  |  +- (commons-logging:commons-logging:jar:1.0.4:compile - omitted for conflict with 1.1.3)
   [INFO] |  |  \- (commons-codec:commons-codec:jar:1.2:compile - omitted for conflict with 1.4)
   [INFO] |  +- (commons-codec:commons-codec:jar:1.4:compile - omitted for duplicate)
   [INFO] |  +- (commons-io:commons-io:jar:2.4:compile - omitted for duplicate)
   [INFO] |  +- commons-net:commons-net:jar:3.1:compile
   [INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
   [INFO] |  +- (javax.servlet:servlet-api:jar:2.5:compile - omitted for duplicate)
   [INFO] |  +- (org.mortbay.jetty:jetty:jar:6.1.26.cloudera.4:compile - omitted for duplicate)
   [INFO] |  +- (org.mortbay.jetty:jetty-util:jar:6.1.26.cloudera.4:compile - omitted for duplicate)
   [INFO] |  +- (com.sun.jersey:jersey-core:jar:1.9:compile - omitted for duplicate)
   [INFO] |  +- com.sun.jersey:jersey-json:jar:1.9:compile
   [INFO] |  |  +- org.codehaus.jettison:jettison:jar:1.1:compile
   [INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
   [INFO] |  |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
   [INFO] |  |  |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
   [INFO] |  |  |     \- (javax.activation:activation:jar:1.1:compile - omitted for conflict with 1.1-osgi)
   [INFO] |  |  +- (org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  +- (org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
   [INFO] |  |  |  +- (org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  |  \- (org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  +- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
   [INFO] |  |  |  +- (org.codehaus.jackson:jackson-core-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  |  \- (org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  \- (com.sun.jersey:jersey-core:jar:1.9:compile - omitted for duplicate)
   [INFO] |  +- (com.sun.jersey:jersey-server:jar:1.9:compile - omitted for duplicate)
   [INFO] |  +- tomcat:jasper-compiler:jar:5.5.23:runtime
   [INFO] |  +- (tomcat:jasper-runtime:jar:5.5.23:runtime - omitted for duplicate)
   [INFO] |  +- (javax.servlet.jsp:jsp-api:jar:2.1:runtime - omitted for duplicate)
   [INFO] |  +- (commons-el:commons-el:jar:1.0:compile - scope updated from runtime; omitted for duplicate)
   [INFO] |  +- (commons-logging:commons-logging:jar:1.1.3:compile - omitted for duplicate)
   [INFO] |  +- (log4j:log4j:jar:1.2.17:compile - omitted for duplicate)
   [INFO] |  +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
   [INFO] |  |  +- (commons-codec:commons-codec:jar:1.4:compile - omitted for duplicate)
   [INFO] |  |  +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1.3)
   [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
   [INFO] |  |  |  \- (org.apache.httpcomponents:httpcore:jar:4.1.2:compile - omitted for duplicate)
   [INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.1.2:compile
   [INFO] |  |  \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
   [INFO] |  +- (commons-lang:commons-lang:jar:2.6:compile - omitted for duplicate)
   [INFO] |  +- commons-configuration:commons-configuration:jar:1.6:compile
   [INFO] |  |  +- (commons-collections:commons-collections:jar:3.2.1:compile - omitted for duplicate)
   [INFO] |  |  +- (commons-lang:commons-lang:jar:2.4:compile - omitted for conflict with 2.6)
   [INFO] |  |  +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1.3)
   [INFO] |  |  +- commons-digester:commons-digester:jar:1.8:compile
   [INFO] |  |  |  +- (commons-beanutils:commons-beanutils:jar:1.7.0:compile - omitted for conflict with 1.8.0)
   [INFO] |  |  |  \- (commons-logging:commons-logging:jar:1.1:compile - omitted for conflict with 1.1.3)
   [INFO] |  |  \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
   [INFO] |  |     \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.1.3)
   [INFO] |  +- org.slf4j:slf4j-api:jar:1.7.5:compile
   [INFO] |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:compile - scope updated from runtime; omitted for duplicate)
   [INFO] |  +- (org.codehaus.jackson:jackson-core-asl:jar:1.8.8:compile - omitted for duplicate)
   [INFO] |  +- (org.codehaus.jackson:jackson-mapper-asl:jar:1.8.8:compile - omitted for duplicate)
   [INFO] |  +- org.apache.avro:avro:jar:1.7.6-cdh5.3.2:compile
   [INFO] |  |  +- (org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  +- (org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile - omitted for conflict with 1.8.8)
   [INFO] |  |  +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
   [INFO] |  |  +- org.xerial.snappy:snappy-java:jar:1.0.5:compile
   [INFO] |  |  +- (org.apache.commons:commons-compress:jar:1.4.1:compile - omitted for duplicate)
   [INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.6.4:compile - omitted for conflict with 1.7.5)
   [INFO] |  +- (com.google.protobuf:protobuf-java:jar:2.5.0:compile - omitted for duplicate)
   [INFO] |  +- com.google.code.gson:gson:jar:2.2.4:compile
   [INFO] |  +- org.apache.hadoop:hadoop-auth:jar:2.5.0-cdh5.3.2:compile
   [INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  +- (commons-codec:commons-codec:jar:1.4:compile - omitted for duplicate)
   [INFO] |  |  +- (log4j:log4j:jar:1.2.17:runtime - omitted for duplicate)
   [INFO] |  |  +- (org.slf4j:slf4j-log4j12:jar:1.7.5:runtime - omitted for duplicate)
   [INFO] |  |  +- (org.apache.httpcomponents:httpclient:jar:4.2.5:compile - omitted for conflict with 4.1.2)
   [INFO] |  |  +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
   [INFO] |  |  |  +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
   [INFO] |  |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  |  +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
   [INFO] |  |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  |  +- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
   [INFO] |  |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  +- (org.apache.zookeeper:zookeeper:jar:3.4.5-cdh5.3.2:compile - omitted for duplicate)
   [INFO] |  |  \- org.apache.curator:curator-framework:jar:2.6.0:compile
   [INFO] |  |     +- (org.apache.curator:curator-client:jar:2.6.0:compile - omitted for duplicate)
   [INFO] |  |     +- (org.apache.zookeeper:zookeeper:jar:3.4.6:compile - omitted for conflict with 3.4.5-cdh5.3.2)
   [INFO] |  |     \- (com.google.guava:guava:jar:16.0.1:compile - omitted for conflict with 11.0.2)
   [INFO] |  +- (com.jcraft:jsch:jar:0.1.42:compile - omitted for conflict with 0.1.50)
   [INFO] |  +- org.apache.curator:curator-client:jar:2.6.0:compile
   [INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.6:compile - omitted for conflict with 1.7.5)
   [INFO] |  |  +- (org.apache.zookeeper:zookeeper:jar:3.4.6:compile - omitted for conflict with 3.4.5-cdh5.3.2)
   [INFO] |  |  \- (com.google.guava:guava:jar:16.0.1:compile - omitted for conflict with 11.0.2)
   [INFO] |  +- org.apache.curator:curator-recipes:jar:2.6.0:compile
   [INFO] |  |  +- (org.apache.curator:curator-framework:jar:2.6.0:compile - omitted for duplicate)
   [INFO] |  |  +- (org.apache.zookeeper:zookeeper:jar:3.4.6:compile - omitted for conflict with 3.4.5-cdh5.3.2)
   [INFO] |  |  \- (com.google.guava:guava:jar:16.0.1:compile - omitted for conflict with 11.0.2)
   [INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
   [INFO] |  +- org.apache.zookeeper:zookeeper:jar:3.4.5-cdh5.3.2:compile
   [INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  +- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
   [INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
   [INFO] |  |  |  \- (log4j:log4j:jar:1.2.17:compile - omitted for duplicate)
   [INFO] |  |  \- (log4j:log4j:jar:1.2.17:compile - omitted for duplicate)
   [INFO] |  \- org.apache.commons:commons-compress:jar:1.4.1:compile
   [INFO] |     \- org.tukaani:xz:jar:1.0:compile
   [INFO] +- org.mule.transports:mule-transport-sftp:jar:3.4.0:compile
   [INFO] |  +- (com.jcraft:jsch:jar:0.1.44-1:compile - omitted for conflict with 0.1.42)
   [INFO] |  +- org.mule:mule-core:jar:3.4.0:compile
   [INFO] |  |  +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
   [INFO] |  |  +- org.safehaus.jug:jug:jar:asl:2.0.0:compile
   [INFO] |  |  +- (commons-cli:commons-cli:jar:1.2:compile - omitted for duplicate)
   [INFO] |  |  +- (commons-collections:commons-collections:jar:3.2.1:compile - omitted for duplicate)
   [INFO] |  |  +- (commons-io:commons-io:jar:1.4:compile - omitted for conflict with 2.4)
   [INFO] |  |  +- (commons-lang:commons-lang:jar:2.4:compile - omitted for conflict with 2.6)
   [INFO] |  |  +- commons-pool:commons-pool:jar:1.5.3:compile
   [INFO] |  |  +- javax.activation:activation:jar:1.1-osgi:compile
   [INFO] |  |  +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
   [INFO] |  |  +- org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1-osgi:compile
   [INFO] |  |  +- javax.annotation:jsr250-api:jar:1.0:compile
   [INFO] |  |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
   [INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.6.1:compile - omitted for conflict with 1.7.5)
   [INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.6.1:compile - omitted for conflict with 1.7.5)
   [INFO] |  |  +- (org.slf4j:slf4j-log4j12:jar:1.6.1:compile - omitted for conflict with 1.7.5)
   [INFO] |  |  +- (log4j:log4j:jar:1.2.16:compile - omitted for conflict with 1.2.17)
   [INFO] |  |  +- (asm:asm:jar:3.1:compile - omitted for duplicate)
   [INFO] |  |  +- asm:asm-commons:jar:3.1:compile
   [INFO] |  |  |  \- asm:asm-tree:jar:3.1:compile
   [INFO] |  |  |     \- (asm:asm:jar:3.1:compile - omitted for duplicate)
   [INFO] |  |  +- org.mvel:mvel2:jar:2.1.3.Final:compile
   [INFO] |  |  +- org.jgrapht:jgrapht-jdk1.5:jar:0.7.3:compile
   [INFO] |  |  \- org.mule.common:mule-common:jar:0.11.0:compile
   [INFO] |  \- (org.mule.transports:mule-transport-file:jar:3.4.0:compile - omitted for duplicate)
   [INFO] +- org.mule.transports:mule-transport-file:jar:3.4.0:compile
   [INFO] |  \- org.mule.modules:mule-module-spring-config:jar:3.4.0:compile
   [INFO] |     +- (org.mule:mule-core:jar:3.4.0:compile - omitted for duplicate)
   [INFO] |     +- org.mule.modules:mule-module-annotations:jar:3.4.0:compile
   [INFO] |     |  +- (org.mule:mule-core:jar:3.4.0:compile - omitted for duplicate)
   [INFO] |     |  \- cglib:cglib-nodep:jar:2.2:compile
   [INFO] |     +- org.springframework:spring-context:jar:3.2.1.RELEASE:compile
   [INFO] |     |  +- org.springframework:spring-beans:jar:3.2.1.RELEASE:compile
   [INFO] |     |  |  \- (org.springframework:spring-core:jar:3.2.1.RELEASE:compile - omitted for duplicate)
   [INFO] |     |  +- org.springframework:spring-aop:jar:3.2.1.RELEASE:compile
   [INFO] |     |  |  +- (org.springframework:spring-beans:jar:3.2.1.RELEASE:compile - omitted for duplicate)
   [INFO] |     |  |  \- (org.springframework:spring-core:jar:3.2.1.RELEASE:compile - omitted for duplicate)
   [INFO] |     |  +- org.springframework:spring-expression:jar:3.2.1.RELEASE:compile
   [INFO] |     |  |  \- (org.springframework:spring-core:jar:3.2.1.RELEASE:compile - omitted for duplicate)
   [INFO] |     |  \- org.springframework:spring-core:jar:3.2.1.RELEASE:compile
   [INFO] |     +- dom4j:dom4j:jar:1.6.1-osgi:compile
   [INFO] |     \- jaxen:jaxen:jar:1.1.1:compile
   [INFO] |        +- (jaxen:jaxen:jar:1.1-beta-6:compile - omitted for cycle)
   [INFO] |        +- (dom4j:dom4j:jar:1.6.1:compile - omitted for conflict with 1.6.1-osgi)
   [INFO] |        +- (jaxen:jaxen:jar:1.0-FCS:compile - omitted for cycle)
   [INFO] |        \- jdom:jdom:jar:1.0:compile
   [INFO] \- com.jcraft:jsch:jar:0.1.50:compile
   [INFO] -------------------------------------------------------------------- 
   [INFO] BUILD SUCCESS
   [INFO] -------------------------------------------------------------------- 
   [INFO] Total time: 7.989 s
   [INFO] Finished at: 2017-08-14T18:02:29+05:30
   [INFO] Final Memory: 18M/356M
   [INFO] --------------------------------------------------------------------      ----
  </code></pre>
  
  <p>After removing all the other JSCH libraries and the following is my maven and I don't see any other JSCH library other than <strong>0.1.50</strong></p>
  
  <p>I still the error in the line</p>
  
  <blockquote>
    <p>client.login(sftpUser, keyFilePath, null);</p>
  </blockquote>
  
  <pre><code> Actual Log:Exception in thread "main" java.lang.NoSuchFieldError: identities
      at com.jcraft.jsch.UserAuthPublicKey.start(UserAuthPublicKey.java:39)
      at com.jcraft.jsch.Session.connect(Session.java:463)
      at com.jcraft.jsch.Session.connect(Session.java:183)
      at org.mule.transport.sftp.SftpClient.login(SftpClient.java:178)
      at karthickArchive.archiveMigration.sftpFileUtil.processFiles(sftpFileUtil.java:46)
      at karthickArchive.archiveMigration.getFileUtility.main(getFileUtility.java:69)
  </code></pre>