cancel
Showing results for 
Search instead for 
Did you mean: 

File to JDBC error

Former Member
0 Kudos

Dear All,

I have working on a file to JDBC scenario, while i am executing the scenario I am getting the following error message in receiver JDBC.

Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

Regards,

Nithiyanandam

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Your receiver JDBC structure is incorrect. Create it on basis of this document.

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

Regards,

Prateek

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Nithiyanandam,

I think the error is not in Receiver CC. As per my analysis Date Type or MDD whcih you have creted/Imported in DESIGN has a problem

Please try cretaing like this

Create a Datetype in SAP XI as the name of your table

<TABLE NAME> (Element)

<STATEMENTNAME>(Element)

<TABLE NAME> (Element)

<action> (atribute)

<TABLE> (Element)

< Col 1>

< Col 2>

..

....

Former Member
0 Kudos

Dear All,

Now that I able to insert the record into the oracle database. But the problem is I am able to insert only one record at a time and not multiple records.

My mapping is like this

Source Target

MT_Sender_File(1 to1) MT_Receiver_JDBC(1 to 1)

row (1 to unbound) Statement(1 to 1 Not mapped to any field

EMPNAME(1 to unbound) EMPLOYEE(1 to 1 Tablename mapped to row)

EMPNUMBER(1 to unbound) action(Attribute required mapped to INSERT)

AGE(1 to unbound) access(1 to unbound mapped to row)

SEX(1 to unbound) EMPNAME(1 to unbound mapped to EMPNAME)

EMPNUMBER(1-unbnd map to EMPNUMBER)

AGE(1 to unbound mapped to AGE)

SEX(1 to unbound mapped to SEX)

But stl im not able to insert multiple records.please let me know how to insert multiple records in this structure.

Regards,

Nithiyanandam

Former Member
0 Kudos

HI,

for each access element one insert statement will be created. So be sure that you create multiple access elements. You can test this in your mapping by using the test tab!

Regards,

Björn

Former Member
0 Kudos

Hi Michal/Prateek,

Can you provide any more inputs...

Regards,

Nithiyanandam

Former Member
0 Kudos

Recheck the Structure Which you have created...

--->Under Action all the Original Fields Should Lie....

Note:Action Should be Attribute Which SAYS INSERT (CAPS) as Constant value

If still Problem Prevails Kindly send me the Error details

Even I faced a Similar Problem...

Edited by: Sainath Chutke on Jan 23, 2009 1:27 PM

Former Member
0 Kudos

Hi,

I am getting only this error in the receiver CC:

Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

I have provided the details of my DT structure in the forum above, let me know whether this is correct or not.

Regards,

Nithiyanandam

Former Member
0 Kudos

The structure Should Look Like

<MT_XYZ> (Message type)

<Statement> (Under Message type)

<XYS> (Under stasttement)

<Action> (Under XYS)

<Access>

<Fileds>

NOTE: Action field Should be given With Some constant value LIKE "INSERT" (without Quotres)

And this will Work....

Edited by: Sainath Chutke on Jan 23, 2009 2:02 PM

Edited by: Sainath Chutke on Jan 23, 2009 2:02 PM

Former Member
0 Kudos

Hi,

make sure that you fill the action attribute within your mapping since the default value is ignored for attributes.

Regards,

Björn

Former Member
0 Kudos

Hi Nithiyanandam,

I guess you are doing File to JDBC and you are using a SQL statement..if it is so...

do check out the SQL query how many records does that statement retrieve..at times if the SQL statement is itself wrong..you will be getting these type of errors..inspite of a correct data structure...

Regards,

Pravin.

Former Member
0 Kudos

Hi,

This is how my structure is and this is how I had done the mapping

DT_receiver_JDBC

STATEMENT

ROW

action

TABLE

access

EMPNAME

EMPNUMBER

AGE

SEX

Will there be any failure cause because of the above case-sensitive issue.

My mapping in text preview is geiven below

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/action=const([value=INSERT])

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/TABLE=const([value=EMPLOYEE])

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/access=

/ns0:MT_Sender_File/row=

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/access/EMPNAME=/ns0:MT_Sender_File/row/EMPNAME=

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/access/EMPNUMBER=/ns0:MT_Sender_File/row/EMPNUMBER=

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/access/AGE=/ns0:MT_Sender_File/row/AGE=

/ns0:MT_Receiver_JDBC/STATEMENT/ROW/access/SEX=/ns0:MT_Sender_File/row/SEX=

Regards,

Nithiyanandam

prateek
Active Contributor
0 Kudos

Make sure "action" is defined as an attribute and not an element in datatype.

Regards,

Prateek

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

open SXI_MONITOR and put here the XML after the mapping

from your flow

Regards,

Michal Krawczyk

Former Member
0 Kudos

Dear Michal,

this is the response message i see in Moni under request message mappaing

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

- <ns0:MT_Receiver_JDBC xmlns:ns0="http://NPI_FILE_2_JDBC">

- <STATEMENT>

- <ROW>

<action>INSERT</action>

<TABLE>EMPLOYEE</TABLE>

- <access>

<EMPNAME>ABC</EMPNAME>

<EMPNUMBER>D0003</EMPNUMBER>

<AGE>24</AGE>

<SEX>F</SEX>

</access>

</ROW>

</STATEMENT>

</ns0:MT_Receiver_JDBC>

Pratheek,

Thanks for your input I made a mistake in action as an element, now i had changed it to attribute

Still I am getting the error message as

Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

Regards,

Nithiyanandam

Former Member
0 Kudos

Hello,

Check whether the data type is activated after changing category from element to attribute and is reflected in message mapping.

Regards,

Sreenvias.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

this is how your XML should look like

<StatementName>

<dbTableName action=u201DINSERTu201D>

<table>EMPLOYEE</table>

<access>

...

and it does not right?

so make sure it does:) what's the problem ?

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi,

I did refer this wiki for doing the scenario:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/jdbc%252bto%252bjdbc

I had configured everything similar to this, could you plz let me know what could be the issue for getting this error:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

Regards,

Nithiyanandam

MichalKrawczyk
Active Contributor
0 Kudos

hi,

as your XML that you send to JDBC must have action attribute

just like shown here:

http://help.sap.com/saphelp_nw04/Helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm

without that it's not a valid JDBC XML

Regards,

Michal Krawczyk