Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JDBC Sender Adapter

Hi everybody

I have the following error in my JDBC to JDBC scenario; I configured the JDBC sender adapter and receive the following message back. In the Configuration I set “Document Name” to MT_ScanningStatus:

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

<MT_ScanningStatus>

<row>

<ScannerNb>1</ScannerNb>

<Status>0</Status>

</row>

<row>

<ScannerNb>2</ScannerNb>

<Status>2</Status>

</row>

<row>

<ScannerNb>3</ScannerNb>

<Status>0</Status>

</row>

<row>

<ScannerNb>4</ScannerNb>

<Status>2</Status>

</row>

</MT_ScanningStatus>

I defined the corresponding datatype as follow:

DT_ScanningStatus Complex Type

row Element 1...unbounded

ScannerNb Element 1

STatus Element 1

In the following Mapping I tried to Map this structure to the Structure used to send an Update SQL Statement to the JDBC Receiver to update the same table. A normal Test in the Mapping Tool runs fine but when I enter under source the above incoming Message from the JDBC Adapter I got the following error. I think the incoming message cannot be interpreted. Can someone support me? I read the documentation for the JDBC adapter and also a lot of weblogs and discussion threads. Maybe someone knows a weblog describing more detailed the sender adapter and how to handle the incoming Message!!

Thanks in advance Oliver

14:58:03 Start of test

Compilation of MM_JDBC_to_JDBC_test successful

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:130)

at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)

Root Cause:

com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)(:main:, row=1, col=8) -> com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:2009)

at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2657)

at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2713)

at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:132)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:142)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:245)

at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:276)

at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:338)

at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:128)

at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)

-


at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:128)

at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:68)

Caused by: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

at com.sap.engine.lib.xml.parser.XMLParser.scanPI(XMLParser.java:2009)

at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2657)

at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2713)

at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:162)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:132)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:142)

at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:245)

at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:276)

at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:338)

at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)

... 3 more

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

Not what you were looking for? View more on this topic or Ask a question