2017-08-16 2 views
0

ich mit dem folgenden Code versuche, auf einen SFTP-Serverauf SFTP-Server anschließen Sinet Fabrik

final String sftpURL = <<my hostname here>>; 
    final String username = <<username here>>; 
    final String password = <<password here>>; 
    SshParameters params = new SshParameters(sftpURL,username,password);    
    Sftp ftp = new Sftp(params); 

    // Connect, upload PNG images and release the connection. 
    ftp.connect();   
    ftp.disconnect(); 

anschließen Wenn es wirft die folgenden Fehler zu verbinden versuchen :::

Exception in thread "main" com.jscape.inet.sftp.SftpException: SHA256 MessageDigest not available 
    at com.jscape.inet.sftp.SftpException.wrap(Unknown Source) 
    at com.jscape.inet.sftp.Sftp.a(Unknown Source) 
    at com.jscape.inet.sftp.Sftp.connect(Unknown Source) 
    at com.bcs.renewals.Test.main(Test.java:19) 
Caused by: com.jscape.util.o.b: SHA256 MessageDigest not available 
    at com.jscape.util.o.b.a(Unknown Source) 
    at com.jscape.util.o.c.a(Unknown Source) 
    at com.jscape.inet.sftp.Sftp.b(Unknown Source) 
    ... 2 more 
Caused by: com.jscape.util.l.a.h: SHA256 MessageDigest not available 
    at com.jscape.inet.ssh.protocol.v2.connection.SessionConnector.connect(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.connection.SessionConnector.connect(Unknown Source) 
    at com.jscape.inet.sftp.SftpFileService3.actualStart(Unknown Source) 
    ... 4 more 
Caused by: com.jscape.util.l.a.b: SHA256 MessageDigest not available 
    at com.jscape.util.l.a.b.a(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.TransportConnection.a(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.TransportConnection.exchangeKeys(Unknown Source) 
    ... 7 more 
Caused by: java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available 
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) 
    at java.security.Security.getImpl(Security.java:695) 
    at java.security.MessageDigest.getInstance(MessageDigest.java:167) 
    at com.jscape.a.f.a(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.keyexchange.DiffieHellmanGroupKeyExchange.createHash(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.keyexchange.DiffieHellmanGroupClientKeyExchange.exchangeKeys(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.TransportConnection.handle(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.messages.SshMsgKexInit.accept(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.messages.SshMsgKexInit.accept(Unknown Source) 
    at com.jscape.inet.ssh.protocol.v2.transport.TransportConnection.c(Unknown Source) 
    ... 9 more 

Die Der obige Code funktionierte einige Monate zuvor. Aber jetzt wirft es den Fehler. Ich habe auch eine aktuelle Version von sinet-factory.jar heruntergeladen. Kann mir bitte jemand helfen, das Problem zu lösen?

Antwort

0

Die Frage war beacause es ein Glas mehr erfordert bcprov-ext-jdk15on-148.jar im CLASSPATH zusammen mit dem sinetfactory.jar ich das und das Problem behoben worden.

Danke.