You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Eugene Matyushkin (JIRA)" <ji...@apache.org> on 2009/06/01 09:36:07 UTC

[jira] Commented: (CAY-1231) Problem with CLOB field under Oracle

    [ https://issues.apache.org/jira/browse/CAY-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715003#action_12715003 ] 

Eugene Matyushkin commented on CAY-1231:
----------------------------------------

We've checked this on 3.0M6. The same result..

> 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
>             Fix For: 2.0.5
>
>
> 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.