cancel
Showing results for 
Search instead for 
Did you mean: 

regarding jdbc scenario

former_member189440
Participant
0 Kudos

hi friends plz find my error "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)".

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

The action should be a Attribute.

and for other info chk this links

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn

former_member189440
Participant
0 Kudos

now i am getting the following error "

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'UDAY' (structure 'STATEMENT'): com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB2ADMIN.UDAY" plz help me

Former Member
0 Kudos

Hi Uday,

Please paste your target payload after mapping.

Also check if the column names in the DB and your receiver structure is exactly same and in the correct order.

SQL state 42704 : An undefined object or constraint name was detected.

Edited by: Shamly MM on Apr 25, 2008 12:49 PM

Edited by: Shamly MM on Apr 25, 2008 12:56 PM

former_member189440
Participant
0 Kudos

HI this is my xslt mapping file please check if any errors r there.

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

<!--

This file was generated by Altova MapForce 2008sp1

YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE

OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.

Refer to the Altova MapForce Documentation for further details.

http://www.altova.com/mapforce

-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:n="http:file2jdbc_xslt" exclude-result-prefixes="xs xsi xsl" xmlns="http:file2jdbc_xslt">

<xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>

<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

<xsl:template match="/n:send_msg_typ">

<n:receive_msg_typ>

<xsl:attribute name="xsi:schemaLocation">

<xsl:value-of select="'http:file2jdbc_xslt C:/DOCUME~1/miracle/Desktop/receive_msg_typ.xsd'"/>

</xsl:attribute>

<xsl:variable name="Vvar0_firstSource" select="."/>

<rowvalue xmlns="">

<statement>

<xsl:attribute name="action">

<xsl:value-of select="'insert'"/>

</xsl:attribute>

<table>

<xsl:value-of select="'emp'"/>

</table>

<access>

<xsl:for-each select="empname">

<xsl:variable name="Vmarkerloopempname" select="."/>

<xsl:for-each select="$Vvar0_firstSource/empnum">

<xsl:variable name="Vmarkerloopempnum" select="."/>

<xsl:for-each select="$Vvar0_firstSource/empsal">

<xsl:variable name="Vmarkerloopempsal" select="."/>

<xsl:for-each select="$Vvar0_firstSource/dept">

<xsl:variable name="Vvar4_result" select="concat($Vmarkerloopempname, $Vmarkerloopempnum)"/>

<xsl:variable name="Vvar5_result" select="concat($Vvar4_result, $Vmarkerloopempsal)"/>

<xsl:variable name="Vvar6_result" select="concat($Vvar5_result, .)"/>

<empdetails>

<xsl:value-of select="$Vvar6_result"/>

</empdetails>

</xsl:for-each>

</xsl:for-each>

</xsl:for-each>

</xsl:for-each>

</access>

</statement>

</rowvalue>

</n:receive_msg_typ>

</xsl:template>

</xsl:stylesheet>

and my error is "Error while parsing or executing XML-SQL document: ERROR occured parsing request:com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Name expected: 0x23(:main:, row:2, col:2)(:main:, row=2, col=2) -> com.sap.engine.lib.xml.parser.ParserException: Name expected: 0x23(:main:, row:2, col:2)"

please rectify my error.

Former Member
0 Kudos

Dear Uday,

Can you also provide the input payload please ? It would be helpful to check your transformation ...

Chris

former_member189440
Participant
0 Kudos

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

<ns0:send_msg_typ xmlns:ns0="http:file2jdbc_xslt">

<empname>uday</empname>

<empnum>1149</empnum>

<empsal>90000</empsal>

<dept>sap</dept>

</ns0:send_msg_typ>.

this is my source file.

Former Member
0 Kudos

Uday,

I've tried your XSLT on yout input source and I get the following (I've removed some ns for clarity) :

<n:receive_msg_typ>

<rowvalue xmlns="">

<statement action="insert">

<table>emp</table>

<access>

<empdetails>uday114990000sap</empdetails>

</access>

</statement>

</rowvalue>

</n:receive_msg_typ>

According to XMLSQL expected insert structure, you should get sthg like this :

<receive_msg_typ>

<statement>

<emp action="INSERT">

<table>emp</table>

<access>

<empdetails>uday114990000sap</empdetails>

</access>

</emp>

</statement>

</receive_msg_typ>

As you can see, your target payload XML structure does not match what XI expects ...

Hope this helps

Chris

Former Member
0 Kudos

Uday:

In the Target Data structure..it seems you haven't passed the value of ACTION (like INSERT, UPDATE, SELECT) or missed that attribute..please check your values in the mapping

Edited by: Guru on Apr 24, 2008 11:41 AM

former_member189440
Participant
0 Kudos

i also passed the action insert in mesg mapping.

Former Member
0 Kudos

Can you post the target structure and same payload please

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Is the Action - Attribute ?

Regards

Agasthuri Doss

ravi_raman2
Active Contributor
0 Kudos

Are you sure this is a jdbc scenario..as if you havent specified the action attribute..you cannot even save and activate your cchannel...

Maybe you are referencing a soap..scenario..where the action is not mandatory..

Regards

Ravi Raman