You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2009/12/08 13:36:18 UTC
[jira] Reopened: (CAY-1231) Problem with CLOB field under Oracle
[ https://issues.apache.org/jira/browse/CAY-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik reopened CAY-1231:
----------------------------------
> Problem with CLOB field under Oracle
> ------------------------------------
>
> Key: CAY-1231
> URL: https://issues.apache.org/jira/browse/CAY-1231
> Project: Cayenne
> Issue Type: Bug
> Components: Cayenne Core Library
> Affects Versions: 2.0 branch
> Environment: Oracle 10g, Cayenne 2.0.4, Java 1.5
> Reporter: Eugene Matyushkin
> Assignee: Andrus Adamchik
> Priority: Critical
> Attachments: CAY-1231_check.patch
>
>
> 1. Creating table:
> CREATE TABLE CRM_PDOCTYPECAT (
> PDOCTYPECATID NUMERIC(19,0) NOT NULL,
> CATNAME VARCHAR(255) NOT NULL,
> CATDESCRIPTION CLOB NULL
> );
> 2. Creating named query
> INSERT INTO CRM_PDOCTYPECAT(
> PDOCTYPECATID,
> CATNAME,
> CATDESCRIPTION
> ) VALUES (
> #bind($PDOCTYPECATID 'NUMERIC'),
> #bind($CATNAME 'VARCHAR'),
> #bind($CATDESCRIPTION 'CLOB')
> )
> 3. Binding very long (more then 32766 chars) string to CATDESCRIPTION.
> 4. Executing query
> Result:
> 2009-05-28 13:32:03,053 [main] INFO org.apache.cayenne.access.QueryLogger - *** error.
> java.sql.SQLException: setString can process only strings less then 32766 symbols in length
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
> at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4588)
> at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4559)
> I guess, setClob should be used instead of setString when working with CLOBs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.