Problems with OracleAdapter

From: laila paganelli (
Date: Wed Mar 23 2005 - 09:42:55 EST

  • Next message: Cris Daniluk: "RE: Problems with OracleAdapter"


    I would like use an OracleAdapter in my application because I want to
    customize PK generation.
    If I create a dataNode with a DbAdapter
    org.objectstyle.cayenne.dba.JdbcAdapter works very well,
    but if I set DbAdapter an error occur.

    INFO 2005-03-23 14:28:04,854 *** error.
    java.sql.SQLException: operation not allowed: streams type cannot be
    used in batching
            at oracle.jdbc.dbaccess.DBError.throwSqlException(
            at oracle.jdbc.dbaccess.DBError.throwSqlException(
            at oracle.jdbc.driver.OraclePreparedStatement.addBatch(
            at org.objectstyle.cayenne.access.DataNode.runBatchUpdateAsBatch(
            at org.objectstyle.cayenne.access.DataNode.runBatchUpdate(
            at org.objectstyle.cayenne.access.DataNode.performQueries(
            at org.objectstyle.cayenne.access.ContextCommit.commit(
            at org.objectstyle.cayenne.access.DataContext.commitChanges(
            at org.objectstyle.cayenne.access.DataContext.commitChanges(

    I'm using a simple ExtendedType implementation for Oracle LONG fields
    (view also
    with a method

    public void setJdbcObject( java.sql.PreparedStatement st,
                                java.lang.Object val,
                                int pos,
                                int type,
                                int precision) throws java.lang.Exception {
        if (val != null) {
            longType = (;
            in = new;
            st.setCharacterStream(pos, in, longType.string().length());
        } else {
            super.setJdbcObject(st, val, pos, type, precision);

    Some suggestion?


    This archive was generated by hypermail 2.0.0 : Wed Mar 23 2005 - 09:43:04 EST