on 06-29-2007 9:59 AM
Hello,
When I try to retrieve an empty CLOB field from an Oracle database (SQL SELECT query), the return message says :
com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_BUD_ORDRE_INT' (structure 'Statement'): java.lang.NullPointerException
It's because JDBC returns a NULL pointer with an empty CLOB field.
It has nothing to do with the mappings but with the adapter itself.
How can I solve this issue?
Thanks in advance for your answers.
Kind regards,
Pierre Lejeune
Thanks for your answers guys. I finally did this :
SELECT coalesce(CLOB, to_clob('empty')) AS CLOB
FROM table
and changed the response mapping in order to check the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pierre,
Just put the CLOB field as occurence of 0..1 instead of 1..1 otehrwise before passing the value to the targe field use the mapwithdefault Standard function if there is not source field.
I think this may solve your problem.
Warm Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
pierre,
check out this thread which I had created...
https://forums.sdn.sap.com/click.jspa?searchID=3550473&messageID=3145948
though there are no answers...and its just a problem, what I want to hightlight is, the statement
CLOB.createTemporary()
has problems in almost all app servers and the application server APIs need to be used in the case when this statement must be executed. e.g. WSJDBCutil class in case of IBM WAS.
in your case, if the statement above, is getting executed may even be implicitely, only some one from SAP can answer if this problem has been taken care off in the XI JDBC adapter design / implementation.
OSS might help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pierre,
in select query use ISNULL(CLOB,'') AS CLOB instead of writing CLOB directly...
Thanks,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi;
You should have the occurance of the CLOB field as 0..1 and not 1..1.Check this out
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.