Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

supsnehal

Posts

7

Joined

Thu May 14, 2009 11:11 pm

Getting a StringIndexOutOfBoundsException while putting file

by supsnehal » Fri Aug 14, 2009 10:13 pm

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Getting a StringIndexOutOfBoundsException while putting

by support2 » Sat Aug 15, 2009 10:49 pm

no avatar
User

supsnehal

Posts

7

Joined

Thu May 14, 2009 11:11 pm

Debug log file

by supsnehal » Tue Aug 25, 2009 7:13 pm

[2009/08/25 04:51:36:982] FTP Reply : 200 NOOP command successful.[2009/08/25 04:52:37:058] FTP Command : ---> NOOP[2009/08/25 04:52:37:058] FTP Reply : 200 NOOP command successful.[2009/08/25 04:53:37:135] FTP Command : ---> NOOP[2009/08/25 04:53:37:135] FTP Reply : 200 NOOP command successful.[2009/08/25 04:54:37:212] FTP Command : ---> NOOP[2009/08/25 04:54:37:212] FTP Reply : 200 NOOP command successful.[2009/08/25 04:55:37:289] FTP Command : ---> NOOP[2009/08/25 04:55:37:289] FTP Reply : 200 NOOP command successful.[2009/08/25 04:56:37:366] FTP Command : ---> NOOP[2009/08/25 04:56:37:366] FTP Reply : 200 NOOP command successful.[2009/08/25 04:56:41:871] FTP Command : ---> PWD[2009/08/25 04:56:41:871] FTP Reply : 200 NOOP command successful.[2009/08/25 04:56:41:871] FTP Command : ---> PWD[2009/08/25 04:56:41:949] FTP Reply : 257 "/" is current directory.[2009/08/25 04:56:41:949] FTP Command : ---> CWD /IPB_IN/GCOM_Collection/CRC/[2009/08/25 04:56:42:023] FTP Reply : 257 "/" is current directory.[2009/08/25 04:56:42:023] FTP Command : ---> PWD[2009/08/25 04:56:42:121] FTP Reply : 250 CWD command successful.[2009/08/25 04:56:42:128] FTP Command : ---> PASV[2009/08/25 04:56:42:192] FTP Reply : 257 "/IPB_IN/GCOM_Collection/CRC" is current directory.[2009/08/25 04:56:42:193] FTPSender -> End FTP Trace Messages -- [2009/08/25 04:56:42:193] ERROR -->> FTPSender -> FAILED to distribute file to FTP server java.lang.StringIndexOutOfBoundsException: String index out of range: -50 at java.lang.String.substring(String.java:1444) at com.enterprisedt.net.ftp.FTPControlSocket.getPASVParts(FTPControlSocket.java:838) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:775) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:547) at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2452) at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2503) at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2576) at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2309) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2194) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:308) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2280) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:369) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2245) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:338) at com.ml.gpb.distfrmw.sender.FTPSender.send(FTPSender.java:268) at com.ml.gpb.distfrmw.sender.Sender.sendObject(Sender.java:276) at com.ml.gpb.distfrmw.core.DistributionTask.processDistribution(DistributionTask.java:255) at com.ml.gpb.distfrmw.core.DistributionTask.call(DistributionTask.java:66) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:534)[2009/08/25 04:56:42:266] ERROR -->> Sender -> ERROR -->> Cannot send filejava.lang.StringIndexOutOfBoundsException: String index out of range: -50 at java.lang.String.substring(String.java:1444) at com.enterprisedt.net.ftp.FTPControlSocket.getPASVParts(FTPControlSocket.java:838) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:775) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:547) at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2452) at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2503) at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2576) at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2309) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2194) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:308) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2280) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:369) at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2245) at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:338) at com.ml.gpb.distfrmw.sender.FTPSender.send(FTPSender.java:268) at com.ml.gpb.distfrmw.sender.Sender.sendObject(Sender.java:276) at com.ml.gpb.distfrmw.core.DistributionTask.processDistribution(DistributionTask.java:255) at com.ml.gpb.distfrmw.core.DistributionTask.call(DistributionTask.java:66) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:534)
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Debug log file

by support2 » Tue Aug 25, 2009 10:47 pm

You are sending NOOP and PWD commands.

The replies from these are getting mixed up with the expected reply to the PASV command, i.e. server responses are out of sequence.

Are you calling these from a different thread? You need to rethink what you are doing here ...
no avatar
User

supsnehal

Posts

7

Joined

Thu May 14, 2009 11:11 pm

by supsnehal » Wed Aug 26, 2009 3:19 am

sorry for the confusing log.

Please find the entire log trace below for another file

[2009/08/25 00:00:38:235] File Status was set to UNDER DISTRIBUTION
[2009/08/25 00:00:38:533] FTPSender -> Start FTP Trace Messages --
[2009/08/24 23:54:13:772] FTP Command : ---> NOOP
[2009/08/24 23:54:13:772] FTP Reply : 227 Entering Passive Mode (169,243,160,1,4,96).
[2009/08/24 23:55:13:852] FTP Command : ---> NOOP
[2009/08/24 23:55:13:852] FTP Reply : 200 NOOP command successful.
[2009/08/24 23:56:13:927] FTP Command : ---> NOOP
[2009/08/24 23:56:13:927] FTP Reply : 200 NOOP command successful.
[2009/08/24 23:57:14:004] FTP Command : ---> NOOP
[2009/08/24 23:57:14:004] FTP Reply : 200 NOOP command successful.
[2009/08/24 23:58:14:080] FTP Command : ---> NOOP
[2009/08/24 23:58:14:080] FTP Reply : 200 NOOP command successful.
[2009/08/24 23:59:14:156] FTP Command : ---> NOOP
[2009/08/24 23:59:14:156] FTP Reply : 200 NOOP command successful.
[2009/08/25 00:00:14:232] FTP Command : ---> NOOP
[2009/08/25 00:00:14:232] FTP Reply : 200 NOOP command successful.
[2009/08/25 00:00:38:236] FTP Command : ---> PWD
[2009/08/25 00:00:38:236] FTP Reply : 200 NOOP command successful.
[2009/08/25 00:00:38:237] FTP Command : ---> PWD
[2009/08/25 00:00:38:307] FTP Reply : 257 "/IPB_IN/GCOM_Collection/CRC" is current directory.
[2009/08/25 00:00:38:308] FTP Command : ---> CWD /IPB_IN/GCOM_Collection/CRC/
[2009/08/25 00:00:38:378] FTP Reply : 257 "/IPB_IN/GCOM_Collection/CRC" is current directory.
[2009/08/25 00:00:38:378] FTP Command : ---> PWD
[2009/08/25 00:00:38:462] FTP Reply : 250 CWD command successful.
[2009/08/25 00:00:38:464] FTP Command : ---> PASV
[2009/08/25 00:00:38:533] FTP Reply : 257 "/IPB_IN/GCOM_Collection/CRC" is current directory.

[2009/08/25 00:00:38:533] FTPSender -> End FTP Trace Messages --
[2009/08/25 00:00:38:533] ERROR -->> FTPSender -> FAILED to distribute file to FTP server
java.lang.StringIndexOutOfBoundsException: String index out of range: -50
at java.lang.String.substring(String.java:1444)
at com.enterprisedt.net.ftp.FTPControlSocket.getPASVParts(FTPControlSocket.java:838)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:775)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:547)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2452)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2503)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2576)
at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2309)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2194)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:308)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2280)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:369)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2245)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:338)
at com.ml.gpb.distfrmw.sender.FTPSender.send(FTPSender.java:268)
at com.ml.gpb.distfrmw.sender.Sender.sendObject(Sender.java:276)
at com.ml.gpb.distfrmw.core.DistributionTask.processDistribution(DistributionTask.java:255)
at com.ml.gpb.distfrmw.core.DistributionTask.call(DistributionTask.java:66)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:534)

[2009/08/25 00:00:38:534] ERROR -->> Sender -> ERROR -->> Cannot send file
java.lang.StringIndexOutOfBoundsException: String index out of range: -50
at java.lang.String.substring(String.java:1444)
at com.enterprisedt.net.ftp.FTPControlSocket.getPASVParts(FTPControlSocket.java:838)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:775)
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:547)
at com.enterprisedt.net.ftp.FTPClient.setupDataSocket(FTPClient.java:2452)
at com.enterprisedt.net.ftp.FTPClient.initPut(FTPClient.java:2503)
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:2576)
at com.enterprisedt.net.ftp.FTPClient.putStream(FTPClient.java:2309)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2194)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:308)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2280)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:369)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:2245)
at com.ml.gpb.distfrmw.connector.DFFTPClient.put(DFFTPClient.java:338)
at com.ml.gpb.distfrmw.sender.FTPSender.send(FTPSender.java:268)
at com.ml.gpb.distfrmw.sender.Sender.sendObject(Sender.java:276)
at com.ml.gpb.distfrmw.core.DistributionTask.processDistribution(DistributionTask.java:255)
at com.ml.gpb.distfrmw.core.DistributionTask.call(DistributionTask.java:66)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:534)

Who is online

Users browsing this forum: Bing [Bot] and 21 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign