cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Adapter

Former Member
0 Kudos

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)

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Oliver,

>>>>source the above incoming Message from the JDBC Adapter I got the following error. I think the incoming message cannot be interpreted.

do this:

in the test tab try your mapping once more

(the correct one)

then save the source xml as file

next compare this saved file with the one

you get from the jdbc sender

>>>>>Declaration not allowed here.(:main:, row:1, col:8)

and compare the first lines in those two XML files

are they the same?

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Michel,

thanks first for your answer and for all your useful weblogs. I have used a lot of them!!

I resolved the problem with information provided in thread

But nevertheless thanks for the hint. Indeed, I did not maintain the correct namespace and Documenttype in the JDBC sender configuration.

Regards Oliver