Exception in thread “client” java.lang.NoSuchMethodError: org.apache.commons.net.ftp.FTPSClient.getDataTimeout()Ljava/time/Duration;
at org.apache.commons.net.ftp.FTPSClient.openDataSecureConnection(FTPSClient.java:697)
at org.apache.commons.net.ftp.FTPSClient.openDataConnection(FTPSClient.java:259)
at org.apache.commons.net.ftp.FTPSClient.openDataConnection(FTPSClient.java:243)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2375)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2348)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2126)
my code is like below
FTPFile[] ftpFiles = ftpClient.listFiles(“/tmp/check”);
I tried rebuilding the code again after updating pom.
Tried setting setDataTimeout.
_openDataConnection is deprecated actually..
should i need to change listfiles method?
But listfiles is not deprecated.So it should work right?
Should i add any lib externally?
is there any other method to listfiles without deprecated ?