我的应用程序调用Cipher.getInstance以便它可以解密密码。 在某些环境中,这会产生问题,因为Cipher.getInstance方法最终会尝试进行挂起的FTP调用。
是否有人知道如何避免此FTP通话或阻止其挂起?
这是堆栈跟踪。
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:370)
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:231)
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:213)
java.net.Socket.connect(Socket.java:643)
java.net.Socket.connect(Socket.java:590)
sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:971)
sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:931)
sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1026)
sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1012)
sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:307)
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:406)
sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:227)
sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:84)
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:128)
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:136)
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:103)
javax.crypto.a$0.run(Unknown Source)
java.security.AccessController.doPrivileged(AccessController.java:420)
javax.crypto.a.a(Unknown Source)
javax.crypto.a.a(Unknown Source)
javax.crypto.a.a(Unknown Source)
javax.crypto.b.a(Unknown Source)
javax.crypto.d.a(Unknown Source)
javax.crypto.d.a(Unknown Source)
javax.crypto.Cipher.c(Unknown Source)
javax.crypto.Cipher.b(Unknown Source)
javax.crypto.Cipher.getInstance(Unknown Source)
javax.crypto.Cipher.getInstance(Unknown Source)