openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-1691) Oracle XMLType column failed to insert/update when xml contains more than 4000 characters
Date Wed, 20 Apr 2011 11:05:05 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022076#comment-13022076
] 

Milosz Tylenda commented on OPENJPA-1691:
-----------------------------------------

Mitchell, you can fix reading of XML values by extending the OracleDictionary and setting
the getStringVal property to ".getClobVal()".

For insert/update, I am afraid there might be no workaround or one is not easy. First, in
your extended OracleDictionary you overrride setClobString method to use the JDBC 4 variant
of setClob mentioned above. Second, you provide your own UpdateManager via openjpa.jdbc.UpdateManager
property and somehow make it use your own implementation of Row interface to emit "XMLType(?)"
in INSERT and UPDATEs.

See also a thread on users list [1] and let us know if you succeed.

[1] http://openjpa.208410.n2.nabble.com/Oracle-XMLType-fetch-problems-td6208344.html#a6252836

> Oracle XMLType column failed to insert/update when xml contains more than 4000 characters
> -----------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1691
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1691
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.2.2, 2.0.0, 2.0.1
>         Environment: Oracle 10g, JDBC driver (ojdbc14.jar) 10.2.0.4.0, OpenJPA 1.2.2
>            Reporter: Kelvin Law
>            Assignee: Milosz Tylenda
>              Labels: openjpa, oracle, xmltype
>             Fix For: 2.1.0
>
>
> Oracle throws the following exception when XML content is greater than 4000 characters:
> ORA-01461: can bind a LONG value only for insert into a LONG column

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message