cancel
Showing results for 
Search instead for 
Did you mean: 

SAP XI/PI 7.11 proxy to jdbc problem

0 Kudos

Dear Sirs,

   I have 1 interfaces from Proxy to JDBC having below problem, can anyone help ?


Could not execute statement for table/stored proc. "dbTableName" (structure "COMMIT") due to java.lang.StringIndexOutOfBoundsException: String index out of range: -1


Best Regards,

CME.



Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

Make sure that all the values that you are sending are not exceeding the length defined in actual database tables.

0 Kudos

Hi Hareesh,

  Thanks for the response, but can you describe into more detail and below was the screen of this error :

Regards,

Ch'ng.

former_member184720
Active Contributor
0 Kudos

If you open the message, you could see the content.

May be one of filed is exceeding the length than it is defined in the database tables.

Let'z say if you have a column under the table defined with length "10" for which you might be sending more than 10 char.

Just compare the payload with the lengths defined in the database tables.

0 Kudos

Hi

     I did not define any fix length in DT for this rows as you can see below:

in action field as below value:

in access field as below value:

former_member184720
Active Contributor
0 Kudos

Not in PI data type.

If you take below xml as an example, Make sure that Name, Address and Key-Field values are not exceeding the length defined in the target system database tables. (In the actual database where you are trying to execute this statement)

<root>

  <stmt>

  <Customers action="SQL_DML">

  <access> UPDATE Customers SET CompanyName=’$NAME$’, Address=’$ADDRESS$' WHERE CustomerID='$KEYFIELD$’

  </access>

  <key>

  <NAME>Company</NAME>

  <ADDRESS>Street 3 </ADDRESS>

  <KEYFIELD>CO</KEYFIELD>

  </key>

  </Customers>

  </stmt>

</root>

0 Kudos

Hi,

  Here is my actual scenario (A) for Proxy to JDBC:

   I have 2 DAE as below:

    DAE1 run Windows2003 SAP XI 7.11 SP8 with Ora db 10.2.0.4 with SAP Kernel 7.11

    DAE2 run Windows2008 SAP XI 7.11 SP11 with Ora db 10.2.0.4 with SAP Kernel 7.20

The scenario (A) ran in DAE1 since 2010 without any problem, but due to we need to retire this DAE1, so we install another DAE2 to replace DAE1. After we switch the scenario (A) from DAE1 to DAE2 we had this error as describe above.

Could not execute statement for table/stored proc. "dbTableName" (structure "COMMIT") due to java.lang.StringIndexOutOfBoundsException: String index out of range: -1


I believe the root cause is due to oracle driver in DAE, can someone tell me how to check and verify ?


Thanks in advance.

CME.

manigram
Active Participant
0 Kudos


HI,

I dont think this is a driver problem, i think this is issues with the length of values in payload. Share the payload with the database team and tell them to update the particular table manuallly . Then if they are able to upload the values from PI payload then you can look this issues in different way.

Regards,

Manigandan

0 Kudos

Hi

  Thanks for the suggestion, but if length is causing the problem, why DAE1 can run without any problem ?

Regards,

CME.

manigram
Active Participant
0 Kudos

Hi,

Both might be the different vesion.

Regards,

Manigandan

former_member184720
Active Contributor
0 Kudos

Hmm.. Can you try collecting additional traces using XPI inspector? which should log SQL statement, connection process etc

0 Kudos

Dear All,

  I managed to solved the problem by changing mapping in IR.

Regards,

CME.

former_member184720
Active Contributor
0 Kudos

Glad to know that.. Can you please close the discussion.