cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding JDBC Error

former_member189440
Participant
0 Kudos

Hi Friends,

I got the error while doing jdbc scenario using java mapping.i got the following error "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: XML Declaration not allowed here.(:main:, row:1, col:65)(:main:, row=1, col=65) -> com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:65)".

please help me on this error.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Wether it is Sender JDBC or Receiver JDBC?

While converting data into the XML payload this type of error comes, because the data may containg the <,> ..etc characters..

Please Check your xml data once.

Regards

Sridhar Goli

former_member189440
Participant
0 Kudos

sender is file and receiver is jdbc.

my input file looks like:

<?xml version="1.0" encoding="UTF-8"?><ns0:SENDER_MSG_TYPE xmlns:ns0="http://FILE2JDBC_US"> <ORGANISATION>MICROSOFT</ORGANISATION> <FIRSTNAME>KUMAR</FIRSTNAME> <LASTNAME>RAJESH</LASTNAME> <STREET>DALAL</STREET> <CITY>MUMBAI</CITY> <STATE>MAHARASTHRA</STATE> <ZIP>430002</ZIP> <PHONE>3187321</PHONE> <FAX>145965</FAX> <ORDERNUMBER>4569</ORDERNUMBER> <POTYPE>OPEN</POTYPE> <ORDERDELIVERYDATE>14041970</ORDERDELIVERYDATE> <ORDERSTATUS>DELIVERED</ORDERSTATUS> <BANKNAME>SBI</BANKNAME> <ACCOUNTNUMBER>123659874</ACCOUNTNUMBER> <BRANCHCODE>345</BRANCHCODE> <PAYMENTTYPE>CASH</PAYMENTTYPE> <CURRENCY>INR</CURRENCY> <PARTNERNAME>IBM</PARTNERNAME> <QUANTITY>TONNE</QUANTITY></ns0:SENDER_MSG_TYPE>

i need the output to be inserted in to asingle field in the database as a string/blob/clob.

and my output looks like.

<?xml version="1.0" encoding="UTF-8"?><ns0: RECEIVER_MSG_TYPE xmlns:ns0="http://FILE2JDBC_US"><STATEMENT><DATABASETABLE ACTION='insert'><TABLE>DATABASETABLE</TABLE><ACCESS><DETAILS><?xml version="1.0" encoding="UTF-8"?><ns0:SENDER_MSG_TYPE xmlns:ns0="http://FILE2JDBC_US"> <ORGANISATION>MICROSOFT</ORGANISATION> <FIRSTNAME>KUMAR</FIRSTNAME> <LASTNAME>RAJESH</LASTNAME> <STREET>DALAL</STREET> <CITY>MUMBAI</CITY> <STATE>MAHARASTHRA</STATE> <ZIP>430002</ZIP> <PHONE>3187321</PHONE> <FAX>145965</FAX> <ORDERNUMBER>4569</ORDERNUMBER> <POTYPE>OPEN</POTYPE> <ORDERDELIVERYDATE>14041970</ORDERDELIVERYDATE> <ORDERSTATUS>DELIVERED</ORDERSTATUS> <BANKNAME>SBI</BANKNAME> <ACCOUNTNUMBER>123659874</ACCOUNTNUMBER> <BRANCHCODE>345</BRANCHCODE> <PAYMENTTYPE>CASH</PAYMENTTYPE> <CURRENCY>INR</CURRENCY> <PARTNERNAME>IBM</PARTNERNAME> <QUANTITY>TONNE</QUANTITY></ns0:SENDER_MSG_TYPE></DETAILS></ACCESS></DATABASETABLE></STATEMENT></ns0:RECEIVER_MSG_TYPE>

PLEASE HELP ME ON THIS ISSUE .

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please confirm the below.

- Have u delployed the driver using Visual admin.

- Is it possible for u to connect to the database using the connection string which u gave above.

deploy the driver like shown here:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf4b1055-0d01-0010-32a3-b3848d77...

Regards,

Surya

Former Member
0 Kudos

Hi Uday,

if a parser throughs a FATAL ERROR than the XML is not valid!

Check The XML in RWB Message Monitoring

Regards Mario