cancel
Showing results for 
Search instead for 
Did you mean: 

A wierd error of JDBC Receiver adapter

Former Member
0 Kudos

Dear Expert,

I got stuck by the JDBC receiver adapter with PI 7.11, the log is

'JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'null' (structure 'SYSTEM'): java.lang.IndexOutOfBoundsException: Index: 1, Size: 1'

explanation :

(1)SYSTEM is the first element in my XML sent to PI and I guarantee it has value, and there is no mapping with this field in the target table.

(2)I tested mapping and comminucation channel -> successfully

(3)db is oracle and the key field is mapped with value

Looking forward to your insight. Thanks very very much

Ray

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ray,

There is some thing you need to check in the table in your database. If any field in your table it's should be null ,So at that time we should send the data to that field.

So kindly check the your table fileds and according to check the your data.

Thank you,

Sateesh

Former Member
0 Kudos

Dear Expert :

Thanks for your reply, but I still could not figure out what had happened, it is so desperate.......

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'null' (structure 'BOOK'): java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

The Oracle DB table has many fields and I mapped the key and other fields which could not be null.

I tried to create a very simple example to test like this , but still it pops up the error like before,

you can see the error message just replaces the text 'SYSTEM' to 'BOOK'.

'null' (structure 'SYSTEM'): (yesterday) -> 'null' (structure 'BOOK'): (today). What could I do????

Thanks so much for your help

<?xml version="1.0" encoding="UTF-8" ?>

<MT_RM_TEST>

<BOOK>17-1627-15</BOOK>

<NAME>Ray</NAME>

</MT_RM_TEST>

-> the XML above is my simple test XML sent (book and name are mapped to the key field and other fields which could not be nulll)

Former Member
0 Kudos

Dear Ray,

This kind of exception "java.lang.IndexOutOfBoundsException: Index: 1, Size: 1" when Array of field lengh is more than that, This kind of expection is came.

For ex : If array of field length is A[10], If you pass the data more than that length, You can get the error.

So kindly check your array of length for filelds

Thank you

Sateesh

Former Member
0 Kudos

Hi Sateesh,

Thanks very much for reply.

Actually there is no length limitation in my case for mapping.

I just sent a simple XML described above and I wish one entry in the db table could be updated. that's it.

And the mapping is string -> varchar(255) , and that's the reason so strange.

Ray

stefan_grube
Active Contributor
0 Kudos

> -> the XML above is my simple test XML sent (book and name are mapped to the key field and other fields which could not be nulll)

Your XML is totally wrong. It is clearly described in online help, how the XML structure must look like.

How is it possible that you ignore this?

Former Member
0 Kudos

Dear Stefan,

Thanks for your suggestions.

If I understand you correctly, you treat this XML as the one after mapping?

no , it is the content before mapping, I believe we could define the XML sent

with the format as desired. Correct me if I am wrong, thanks

Ray

Former Member
0 Kudos

Hi Ray,

Yes Stefan is exactly Right,Sorry.

If you are calling the stored procedure in Receiver side, If you must follow the standard structure for Stored procedure.

Please find the below link.

http://help.sap.com/saphelp_nw04/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm

Thank you,

Sateesh

Former Member
0 Kudos

Dear expert ,sorry for the bothering, I believe I am misunderstood......

I sent a message as you have seen above in my simple testcase, and this XML below is the

content after mapping.

<?xml version="1.0" encoding="UTF-8" ?>

<ns0:MT_RM_BOOK xmlns:ns0="urn:com.ecc.rm">

<StatementName>

<dbTableName action="UPDATE_INSERT">

<table>BOOK</table>

<access>

<BOOK_NO>17-1627-15</BOOK_NO>

<BOOKID hasQuot="No">104410</BOOKID>

<AUTHOR>RAY</AUTHOR>

</access>

<key1>

<BOOK_NO>17-1627-15</BOOK_NO>

</key1>

</dbTableName>

</StatementName>

</ns0:MT_RM_BOOK>

I just don't know why it pops out such java exception .. Thanks very much.

Ray

Former Member
0 Kudos

Hi Ray,

Kindly check below forum thread

Thanks,

Sateesh

former_member200962
Active Contributor
0 Kudos
hasQuot="No"

Check if No is case-sensitive....in this blog: /people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server it is mentioned as no and it worked fine.

Confirm that you need to have hasQuot.

Former Member
0 Kudos

Hi sateesh,

I reviewed that post before ,but I believe we are different case. I don't have multiple occurence, just one

simple XML without any repetition.

I also tried to change key1 to key, no help, sad......

Ray

Former Member
0 Kudos

Hi Ray,

I thought i found the issue,

Please add the attribute for "compareOperation" in your key field element,

compareOperation = EQ

map the constant value 'EQ' to compareOperation.

Key1                            Element
--Book_NO                     Element
----compareOperation attribute

Thank you

Sateesh

Edited by: sateesh kumar .N on Sep 16, 2010 11:12 AM

Edited by: sateesh kumar .N on Sep 16, 2010 11:14 AM

Former Member
0 Kudos

Dear Experts,

Thanks so much for your generous suggestions, but unfortunately it does not work.....

So I build the message mapping from the scratch and restart the PI and it works now.

Thank you again for your help

Ray

Answers (3)

Answers (3)

Former Member
0 Kudos

rebuild the mapping from scratch

Former Member
0 Kudos

Hi Ray,

In the above structure, instead of 'key1', just use 'key' word and try again.

-Supriya.

Former Member
0 Kudos

@ Supriya

In the above structure, instead of 'key1', just use 'key' word and try again.

How come it's gonna make a difference if you use "key1" instead of "key"? There is no difference. You can use whatever and it will still work.

Good that SAP declares - they are not responsible for the answers posted on SDN

Former Member
0 Kudos

Hi,

Refer the below thread, same issue is discussed:

-Supriya.