Search My Ramblings

Thursday, April 11, 2013

Oracle Fusion Middleware-Inserting large XML into XMLType columns

A couple of years ago I ran into this issue with Oracle SOA Suite 10g, and posted on this blog how to resolve it.  Which is great since I used basically the same solution in 11g and it works there as well, only it doesn't require any server changes at all.

If you're trying to save a large XML payload into an XMLType column type in an Oracle database table from a DbAdapter partner link (JCA Adapter in OSB), and receive the error:

ORA-01461: can bind a LONG value only for insert into a LONG column

 You should only need to edit the mappings.xml for that partner link, navigate to the column that is an XMLType in the database, and change the xsi:type from "direct-mapping" to "direct-xml-type-mapping".

Then recompile your SOA composite (or update the OSB mappings file) and redeploy and test.

It should now support larger-size XML payloads!