FtpClient 调用storeFile 抛出 java.net.SocketException异常

在使用换了commons-net 的 FTPClient 调用storeFile方法时报错,

调用

res = ftp.storeFile(remoteFileName, inputStream);
后返回true,并且文件能正常上传,但是抛出
java.net.SocketException: Socket closed
异常。

解决:

更新commons-net  jar包,从3.0升到3.4 该问题消失了。

猜你喜欢

转载自www.cnblogs.com/Allen-win/p/10695429.html
今日推荐