cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC XML SQL error

Former Member
0 Kudos

Hi experts,

Please, can anyone help me with an issue regarding JDBC XML SQL?

I'm trying to insert data into Oracle database using JDBC Adapter.

The payload is:


<?xml version="1.0" encoding="UTF-8" ?> 
- <ns1:MT_MyMessageType xmlns:ns1="urn:company-com:xpt:comp">
- <Statement>
- <TB_MYORACLETABLE action="INSERT">
- <access>
  <FIELDNAME1>SA</FIELDNAME1> 
  <FIELDNAME2>SAP7</FIELDNAME2> 
  </access>
  </TB_MYORACLETABLE>
  </Statement>
  </ns1:MT_MyMessageType>

And I'm geting this error:


Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing 
request in sax parser: Error when executing statement for table/stored proc. 'TB_MYORACLETABLE' 
(structure 'Statement'): java.sql.SQLException: ORA-01861: literal does not match format string

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi the error is in the length of ure string or somethng

ORA-01861: literal does not match format string

Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading whitespace). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra whitespace.

Action: Correct the format string to match the literal.

Please change the length of the inputs or check if there is any restriction on the database level

Rgds

Adi

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

the structure has to be;

<StatementName2>

<dbTableName action=u201DINSERTu201D>

<table>realDbTableName</table>

<access>

<col1>val1</col1>

<col2>val2</col2>

</access>

<access>

<col1>val11</col1>

</access>

</dbTableName>

</StatementName2>

ref:

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