cancel
Showing results for 
Search instead for 
Did you mean: 

Error In Mapping Flat file to JDBC

Former Member
0 Kudos

hi,

I am doing a flat file content conversion to JDBC scenario. I am getting following error.

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 'Message1'): java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

FCC Parameter is

H.fieldNames EMPID,EMPNAME,FLAG

H.fieldSeparator ,

H.endSeparator 'nl'

ignoreRecordSetName true

While mapping structure is like this.

Sender side

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_FILE xmlns:ns1="http://ns_jdbctest">

<EMPID/>

<EMPNAME/>

<FLAG/>

</ns1:MT_FILE>

</ns0:Message1>

</ns0:Messages>

Rec JDBC

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_JDBC xmlns:ns1="http://ns_jdbctest">

<STATEMENTNAME>

<TEST action="INSERT">

<TABLE>TESTX</TABLE>

<access>

<EMPID/>

<EMPNAME/>

<FLAG/>

</access>

</TEST>

</STATEMENTNAME>

</ns1:MT_JDBC>

</ns0:Message1>

</ns0:Messages>

Please provide me your inputs.

Thanks

Laxmi Bhushan

Edited by: laxmi bhushan on Sep 13, 2010 3:06 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, please check your target table in the SQL database and ur xi payload and check if ur not passing a blank value for the mandatory field in SQL Table.

Former Member
0 Kudos

Hi,

Database is not updated. Payload is giving full data but in comunication cannel monitoring , i am getting following error.

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 'Message1'): java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

thanks

Laxmi Bhushan

Answers (7)

Answers (7)

Former Member
0 Kudos

Answerd

Former Member
0 Kudos

Hi Lakshmi Bhusan,

Can you please elaborate me about your solution.

Thank you ,

Sateesh

Former Member
0 Kudos

Hi Lakshi... How did you solved this problem.?

Thanks

Vankadoath

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi

please make sure that you respect the case sensitive of the XMLstructure for SQL-XML

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm if not, please change it

also, as i can see you have a multimapping but as your example you generate one statement from one file?

can you tell me how is your multimapping?

1:N or N:1

stefan_grube
Active Contributor
0 Kudos

From the error message it seems that you use a multimapping structure in a single mapping scenario.

When you do not have multimapping, your payload must not have <message>, <message1> tags.

Former Member
0 Kudos

Yes,

You are right, But after changing occurence to signature tab in mapping i got the following error.

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

- <!-- Request Message Mapping

-->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_FILE_JDBC_</SAP:P1>

<SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>

<SAP:P3>on: Cannot create target element /ns0:MT_JDBC/STAT</SAP:P3>

<SAP:P4>EMENTNAME/TEST/access. Values missing in queue co~</SAP:P4>

<SAP:AdditionalText />

<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_FILE_JDBC_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_JDBC/STATEMENTNAME/TEST/access. Values missing in queue co~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

while i have same mapping running with xml file. We i use flat file it is giving error that is discribed above.

thanks

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi,

This error is related with values that are losted coz wrong use of context changes in the mapping. check you mapping and you will see that you are losing the context change for that field, maybe a splitByValue(ValueChange) is nedded but i dont know if apply

Former Member
0 Kudos

Check whether for any particular field if the data length is more that it is expected at the target SQL end.

For ex., data length for a field going into database is 10, but database is configured to accomodate only 8.

-Supriya.

stefan_grube
Active Contributor
0 Kudos

> <TEST action="INSERT">

> <TABLE>TESTX</TABLE>

Try <table> instead of <TABLE>

Former Member
0 Kudos

Hi,

I have changed as per your suggetion. i think mapping occurrence is having problem.

still having the same problem.

Regards

Laxmi Bhushan

Former Member
0 Kudos

Hi,

Please provide your input.

Former Member
0 Kudos

Hi,

It seems that i got problem in mapping occurance between flat file to jdbc.

File mapping Structure

MT_FILE Element DT_File null

EMPID Element xsd:string 1 false

EMPNAME Element xsd:string 1 false

FLAG Element xsd:string 1 false

JDBC MAPPING occurrence

MT_JDBC Element DT_JDBC null

STATEMENTNAME Element 1 false

TEST Element 1 false

action Attribute xsd:string required false

TABLE Element xsd:string 1 false

access Element 1..unbounded false

EMPID Element xsd:string 1 false

EMPNAME Element xsd:string 1 false

FLAG Element xsd:string 1 false

please check the mapping

Thanks

Shabarish_Nair
Active Contributor
0 Kudos

what is the outcome of your mapping?

is the JDBC structure getting filled with data?

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

Former Member
0 Kudos

Hi,

During testing it is filling the data and SXMB Moni payload is giving all data from the flat files.

Regards

Laxmi Bhushan jha