i am using edtftpj-1.5.2.jar and also test with edtftpj-1.5.3.jar and write my own wrapper to access the base functionalty of edtftpj.
on my development enviroment it work fine but on my production enviroment it give the following exception:....
Exception in thread "Thread-3" java.lang.IllegalAccessError: tried to access method com.enterprisedt.net.ftp.FTPClient.<init>()V from class com.ab.service.billpaymentschedularservice.FTPService.FTP
at com.ab.service.billpaymentschedularservice.FTPService.FTP.connect(FTP.java:94)
my development enviroment is Windows XP, and production RHEL (Linux) 3.0
my connect method is as follows:
public boolean connect() throws IOException, Exception {
boolean istrue = false;
try {
Logger.setLevel(Level.ALL);
// set up client
ftp = new FTPClient();
ftp.setRemoteHost(ftpAddress);
ftp.setRemotePort(ftpPort);
listener = new FTPMessageCollector();
ftp.setMessageListener(listener);
//ftp.setAutoPassiveIPSubstitution(true);
// connect
log.info("Connecting");
ftp.connect();
log.info("****FTP Connection successfull*****");
// if ((ftpUser == null || ftpUser != "") && (ftpPassword == null || ftpPassword != "")) {
ftp.login(ftpUser, ftpPassword);
// }
// set up passive ASCII transfers
log.debug("Setting up passive, ASCII transfers");
ftp.setConnectMode(FTPConnectMode.PASV);
ftp.setType(FTPTransferType.ASCII);
if (ftpPath == null || ftpPath != "") {
ftp.chdir(ftpPath);
}
istrue = true;
}
catch (FTPException fex) {
log.error("FTPException in i2cFTP Connect" + fex.toString());
fex.printStackTrace();
throw fex;
}
catch (IOException ioe) {
log.error("IOException in i2cFTP Connect" + ioe.toString());
ioe.printStackTrace();
throw ioe;
}
catch (Exception ex) {
log.error("****i2cFTP Connection FAILED*****" +
"\nException:FTP Connection FAILED. due to Net Work Problem: Connect @JFTP");
ex.printStackTrace();
throw ex;
}
return istrue;
}
i didnt find any help on this here in forum.
kindly guide me what is wrong i m doing. ASAP