FAQ
Using Cayenne 3.0 against Oracle 11 with driver ojdbc6-11.2.0.1.0.jar.

Getting a commit error. We get java.sql.SQLException: Invalid argument(s) in
call.

Here is part of the info stack:

SELECT PROPERTYVALUE FROM CSPROPERTY WHERE CSPROPERTYGUID = ? FOR UPDATE
[bind: 1:'...']

INFO: [write LOB: 1:'true']




It seems it is trying to write a LOB to a CLOB and is failing at that.
Suggestions?
--
View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1475847.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

Search Discussions

  • Andrus Adamchik at Sep 14, 2010 at 9:45 pm
    Hi there,

    My memory of this code is a bit rusty now. Could you provide a bigger chunk of the stack please - up to the DataContext commit call? And also maybe an output of DESC CSPROPERTY to see the types of PROPERTYVALUE and CSPROPERTYGUID columns.

    Andrus

    On Sep 14, 2010, at 5:23 PM, bdflyfisher wrote:


    Using Cayenne 3.0 against Oracle 11 with driver ojdbc6-11.2.0.1.0.jar.

    Getting a commit error. We get java.sql.SQLException: Invalid argument(s) in
    call.

    Here is part of the info stack:

    SELECT PROPERTYVALUE FROM CSPROPERTY WHERE CSPROPERTYGUID = ? FOR UPDATE
    [bind: 1:'...']

    INFO: [write LOB: 1:'true']




    It seems it is trying to write a LOB to a CLOB and is failing at that.
    Suggestions?
    --
    View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1475847.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.
  • Bdflyfisher at Sep 14, 2010 at 10:42 pm
    In my searching, I found the following, which makes me think this was not an
    issue in cayenne 2, but is an issue in cayenne 3.0, and will be fixed in
    cayenne 3.1. Is that true? Here is the link:

    https://issues.apache.org/jira/browse/CAY-1307

    Here is the full error stack:



    INFO: --- will run 1 query.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logBeginTransaction
    INFO: --- transaction started.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: UPDATE CSPROPERTY SET PROPERTYVALUE = EMPTY_CLOB() WHERE
    CSPROPERTYGUID = ?
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logUpdateCount
    INFO: === updated 1 row.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: SELECT PROPERTYVALUE FROM CSPROPERTY WHERE CSPROPERTYGUID = ? FOR
    UPDATE [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [write LOB: 1:'true']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQueryError
    INFO: *** error.
    java.sql.SQLException: Invalid argument(s) in call
    at oracle.jdbc.driver.T4CConnection.newWriter(T4CConnection.java:3516)
    at oracle.sql.CLOB.setCharacterStream(CLOB.java:1168)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.writeClob(OracleLOBBatchAction.java:296)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.processLOBRow(OracleLOBBatchAction.java:199)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.performAction(OracleLOBBatchAction.java:128)
    at
    org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
    at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
    at
    org.apache.cayenne.access.DataDomainFlushAction.runQueries(DataDomainFlushAction.java:226)
    at
    org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:144)
    at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:824)
    at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:791)
    at
    org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
    at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:788)
    at
    org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1106)
    at
    org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1045)




    desc csproperty
    Name Null Type
    ------------------------------ --------
    ----------------------------------------------------------------
    CSPROPERTYGUID NOT NULL VARCHAR2(36)
    PROPERTYVALUE NOT NULL CLOB()


    --
    View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1476283.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.
  • Michael Gentry at Sep 15, 2010 at 1:10 pm
    CAY-1307 describes a problem that existed with Oracle 8, so I'm not
    sure it applies to Oracle 11. Also, it was fixed before 3.0 final was
    released, so you are running with that patch.

    mrg

    On Tue, Sep 14, 2010 at 6:42 PM, bdflyfisher wrote:

    In my searching, I found the following, which makes me think this was not an
    issue in cayenne 2, but is an issue in cayenne 3.0, and will be fixed in
    cayenne 3.1. Is that true? Here is the link:

    https://issues.apache.org/jira/browse/CAY-1307

    Here is the full error stack:



    INFO: --- will run 1 query.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logBeginTransaction
    INFO: --- transaction started.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: UPDATE CSPROPERTY SET PROPERTYVALUE = EMPTY_CLOB() WHERE
    CSPROPERTYGUID = ?
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logUpdateCount
    INFO: === updated 1 row.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: SELECT PROPERTYVALUE FROM CSPROPERTY WHERE CSPROPERTYGUID = ? FOR
    UPDATE [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [write LOB: 1:'true']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQueryError
    INFO: *** error.
    java.sql.SQLException: Invalid argument(s) in call
    at oracle.jdbc.driver.T4CConnection.newWriter(T4CConnection.java:3516)
    at oracle.sql.CLOB.setCharacterStream(CLOB.java:1168)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.writeClob(OracleLOBBatchAction.java:296)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.processLOBRow(OracleLOBBatchAction.java:199)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.performAction(OracleLOBBatchAction.java:128)
    at
    org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
    at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
    at
    org.apache.cayenne.access.DataDomainFlushAction.runQueries(DataDomainFlushAction.java:226)
    at
    org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:144)
    at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:824)
    at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:791)
    at
    org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
    at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:788)
    at
    org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1106)
    at
    org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1045)




    desc csproperty
    Name Null Type
    ------------------------------ --------
    ----------------------------------------------------------------
    CSPROPERTYGUID  NOT NULL VARCHAR2(36)
    PROPERTYVALUE   NOT NULL CLOB()


    --
    View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1476283.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.
  • Ольга Ткачева at Sep 15, 2010 at 2:26 pm
    Hi guys!

    In the near future I will try to investigate this issue. I hope tomorrow.


    2010/9/15 Andrus Adamchik <andrus@objectstyle.org>:

    Begin forwarded message:
    From: bdflyfisher <bdflyfisher@yahoo.com>
    Date: September 14, 2010 6:42:21 PM EDT
    To: user@cayenne.apache.org
    Subject: Re: Cayenne error while committing CLOB on Oracle
    Reply-To: user@cayenne.apache.org


    In my searching, I found the following, which makes me think this was not an
    issue in cayenne 2, but is an issue in cayenne 3.0, and will be fixed in
    cayenne 3.1. Is that true? Here is the link:

    https://issues.apache.org/jira/browse/CAY-1307

    Here is the full error stack:



    INFO: --- will run 1 query.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logBeginTransaction
    INFO: --- transaction started.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: UPDATE CSPROPERTY SET PROPERTYVALUE = EMPTY_CLOB() WHERE
    CSPROPERTYGUID = ?
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logUpdateCount
    INFO: === updated 1 row.
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQuery
    INFO: SELECT PROPERTYVALUE FROM CSPROPERTY WHERE CSPROPERTYGUID = ? FOR
    UPDATE [bind: 1:'8e07797b-84ac-e434-e040-007f01...']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger
    logQueryParameters
    INFO: [write LOB: 1:'true']
    Sep 14, 2010 4:26:19 PM org.apache.cayenne.access.QueryLogger logQueryError
    INFO: *** error.
    java.sql.SQLException: Invalid argument(s) in call
    at oracle.jdbc.driver.T4CConnection.newWriter(T4CConnection.java:3516)
    at oracle.sql.CLOB.setCharacterStream(CLOB.java:1168)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.writeClob(OracleLOBBatchAction.java:296)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.processLOBRow(OracleLOBBatchAction.java:199)
    at
    org.apache.cayenne.dba.oracle.OracleLOBBatchAction.performAction(OracleLOBBatchAction.java:128)
    at
    org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
    at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:269)
    at
    org.apache.cayenne.access.DataDomainFlushAction.runQueries(DataDomainFlushAction.java:226)
    at
    org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:144)
    at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:824)
    at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:791)
    at
    org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:850)
    at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:788)
    at
    org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1106)
    at
    org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1045)




    desc csproperty
    Name Null Type
    ------------------------------ --------
    ----------------------------------------------------------------
    CSPROPERTYGUID        NOT NULL VARCHAR2(36)
    PROPERTYVALUE NOT NULL CLOB()


    --
    View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1476283.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.


    --
    Olga Tkacheva
  • Bdflyfisher at Sep 16, 2010 at 5:06 pm
    I reverted back to the previous version of jdbc driver and the CLOB problem
    does not exist.

    Specifically:

    ojdbc6-11.1.0.7.0.jar appears to handle a CLOB just fine, whereas
    ojdbc6-11.2.0.1.0.jar displays the CLOB bug.
    --
    View this message in context: http://cayenne.195.n3.nabble.com/Cayenne-error-while-committing-CLOB-on-Oracle-tp1475847p1488627.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedSep 14, '10 at 9:28p
activeSep 16, '10 at 5:06p
posts6
users4
websitecayenne.apache.org

People

Translate

site design / logo © 2021 Grokbase