cancel
Showing results for 
Search instead for 
Did you mean: 

File processing failed with java.lang.StringIndexOutOfBoundsException:

jakob_steen-petersen
Active Participant
0 Kudos

Hi

I´m reading and sending files to an FTP server using SAP PI. I use file content conversion.

Everything has been working fine for months - but now the server was changes to a new host. The only thing changed was the host/user and pass.

But sending too the server fails with this error:

File processing failed with java.lang.StringIndexOutOfBoundsException: String index out of range: -27

Any body who has a clue??

Reading files works ok. And i can transfer files to the FTP server with FileZilla without problems.

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

This error will appear if index in the string is passing greater than the string size or negative value of index in string.

Check your string size length whereever it is applicable.

jakob_steen-petersen
Active Participant
0 Kudos

Hi

And where do i check the "String size" ?? and why do i need that if only the FTP server has changed? No file content are changed...

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Where do you get exception? Example in the mapping step? Check the data elements ...

jakob_steen-petersen
Active Participant
0 Kudos

In the file transfer by ftp:

2011-10-03 17:27:08 Information Transfer: "BIN" mode, size 737 bytes, encoding -.

2011-10-03 17:27:08 Error File processing failed with java.lang.StringIndexOutOfBoundsException: String index out of range: -27

2011-10-03 17:27:08 Error Adapter Framework caught exception: String index out of range: -27

2011-10-03 17:27:08 Error Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error occurred while connecting to the FTP server "nnn.nn.nnn.nnn:21": java.lang.StringIndexOutOfBoundsException: String index out of range: -27.

Its on the adapter level. All mappings etc are fine. And as i write has been for months. The only thing changed are the FTP server

jakob_steen-petersen
Active Participant
0 Kudos

Problem solved; switched to Active mode FTP...