Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: ORA-1461 trying to insert String to XMLType

I have not heard anything back on this, nor have I been able to get any answers on the oracle technet forum, though I've seen some posts in the past year with other people having the same problem (on the oracle forum, which were never answered). I suspect this is an Oracle bug, but I don't have access to metalink to download patches, if such exist.

So I'm looking for another way. It seems that one poster was able to get his xml into an XMLType by creating a temporary CLOB in code - writing directly to the JDBC api. Is there a way to do something comparable with eclipselink?

I need this insert to happen in the same transaction as other operations, so it needs access to the connection being used by a given EntityManager. Is it possible to do this through a createNativeQuery, or do I need to get the Connection object?

Thanks.

- DAP

On Mar 27, 2009, at 2:01 PM, David Parker wrote:

I have a JPA object with a String attribute that is bound to a database column of XMLType (Oracle 10g R2). When I try to persist the object, I get the error
	ORA-01461: can bind a LONG value only for insert into a LONG column
I have seen some posts in various places about problems of this kind with writing to an XMLType. I am just using XMLType for the first time, so I may be missing some configuration, but I am able to insert into it OK from SQL*Plus.

Is there specific support in Eclipselink somewhere for XMLType fields, or has anybody run into this?
=============================================
David Parker
dap@xxxxxxxxxxxxxxxxxxxx





=============================================
David Parker
dap@xxxxxxxxxxxxxxxxxxxx






Back to the top