on 03-15-2012 3:46 PM
Hi Guys,
I have a requirement to insert the payload as an xml in the database, So that all records in one go.
I am using "return as XML" functionlity and passing this to one of the field of a table.
At the target side, i have created a table in Oracle with 3 columns--INTERFACE.,XML(type BLOB), DATE. and i need to pass the payload to XML field of a table.
but when i run this interface i am getting wierd errors.
"JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'XML_LOAD' (structure 'StatementName'): java.sql.SQLException: ORA-00936: missing expression "
here are the details i am passing:
Action: INSERT
Table: XML_LOAD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried to perform the same action, with an empty value in blog field?
Some times, due to blob image field dimension, jdbc operations have some issues (specially in abap application).
The workaround for this issue, is to use a DB Cursor with Fetch command, or an oracle StoredProcedure.
However, the "missing expression" error, indicate that a required part of a clause or expression has been omitted. For example, a SELECT statement may have been entered without a list of columns or expressions or with an incomplete expression. This message is also issued in cases where a reserved word is misused, as in SELECT TABLE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply simone...
where can i see this select statement? i am just INSERTing the payload to database and i have not used any select statement here.
IF i need to write a stored procedue,..how do i write? could you please help me with the code if you can.
your help is really appreciate.
thanks
>where can i see this select statement? i am just INSERTing the payload to database and i have not used any select statement here.
You r inserting here. Your target structure converted to statement during runtime by JDBC adapter. Use logSQLStatement = true in the advaced tab of the jdbc reciever channel. THis will provide log traces during runtime.
The problem is the insert statement generated is wrong here. It does not specify table name properly or statement is not valid one.
Hi Simone,
I tried even that option, but its stil failing.
here is log from AE.
"INSERT into XML_LOAD(PAYLOAD,INTERFACE_ID) VALUES(<?XML VERSION="1.0" encoding ="UTF-8"?
could not execute the statement for table/strored proc."XML_LOAD"(structure"statementName") due to javaSQLException ORA-00936:missing expressions.
can some one please give valuable suggestions.
thanks
first all use replace string function and try to remove xml declaration "<?XML VERSION="1.0" encoding ="UTF-8"?" from xml string and then chk....
i have implemented the same req and used SP (few years back) for the same where SP parsed the input xml string and performed the necessary operations on the database......i am not a database expert but i guess SP option seems to be more useful one...
Hi Smith,
Please take help form ur database team..i am sure they will be knowing abt this...
(as alread stated)i am not a DB expert but i can tell u that u have to use a combination of xml_preparedocument along with OPENXML to create a SP which which suits ur design. Chk below links this will help u in creating SP which will parse the input xml string:
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.