7 Replies Latest reply on Feb 12, 2002 7:55 PM by 3004

    Oracle 8.1.7 driver limit causes problems with CMP

    3004
      The information below is from Oracle's site and has been noted by a few
      people on various message groups. We had upgraded to 8.1.7 but hadn't put
      the latest classes12.zip (June 2001) in our classpath. When we do, we get
      the following error from the driver/generated code. We believe this is
      because we are hitting the limit cited below. I don't know why the Oracle
      driver has this limit, but since WL generates this code for the EB, I don't
      see an easy way for us to avoid it.

      Anyone have any comments on this? Is my interpretation of the stacktrace
      correct? If we go back to the old classes12.zip (June 2000) then we don't
      have this problem. But in addition to wanting to run the matching zip file
      with the version of the DB, we also want to use some of the functionality in
      the 8.1.7 zip. Does BEA have a workaround for CMP?

      java.rmi.UnexpectedException: Unexpected exception in
      sync.server.system.SystemSessionDataBean.setSessionData():
      java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER bind
      variable
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
      at
      oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
      )
      at
      oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
      at
      oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
      :2053)
      at
      oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
      ment.java:398)
      at
      weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
      47)
      at
      sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
      nDataPSWebLogic_CMP_RDBMS.java:318)
      at
      sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
      DataPSWebLogic_CMP_RDBMS.java:284)
      at weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
      at
      weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
      a:227)
      at
      weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
      a:355)
      at weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)


      ---
      Using Streams to Avoid Limits on setBytes() and setString()
      There is a limit on the maximum size of the array which can be bound using
      the PreparedStatement class setBytes() method, and on the size of the string
      which can be bound using the setString() method.

      Above the limits, which depend on the version of the server you use, you
      should use setBinaryStream() or setCharacterStream() instead.

      When connecting to an Oracle8 database, the limit for setBytes() is 2000
      bytes (the maximum size of a RAW in Oracle8) and the limit for setString()
      is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

      When connecting to an Oracle7 database, the limit for setBytes() is 255
      bytes (the maximum size of a RAW in Oracle7) and the limit for setString()
      is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

      The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed the limit
      when using setBytes() or setString(), but you may receive the following
      error:

      ORA-17070: Data size bigger than max size for this type

      Future versions of the Oracle drivers will raise an error if the length
      exceeds these limits.



        • 1. Re: Oracle 8.1.7 driver limit causes problems with CMP
          3004
          Hi Joe,

          This limit defines limit written to oracle strings, raws, blobs and clobs
          when setBytes is used. It has nothing to do with the exception you're
          getting.

          Could you show us your CMP deployment descriptor(s)?

          Regards,

          Slava Imeshev


          "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
          news:3c34de87@newsgroups.bea.com...
          The information below is from Oracle's site and has been noted by a few
          people on various message groups. We had upgraded to 8.1.7 but hadn't put
          the latest classes12.zip (June 2001) in our classpath. When we do, we get
          the following error from the driver/generated code. We believe this is
          because we are hitting the limit cited below. I don't know why the Oracle
          driver has this limit, but since WL generates this code for the EB, I
          don't
          see an easy way for us to avoid it.

          Anyone have any comments on this? Is my interpretation of the stacktrace
          correct? If we go back to the old classes12.zip (June 2000) then we don't
          have this problem. But in addition to wanting to run the matching zip
          file
          with the version of the DB, we also want to use some of the functionality
          in
          the 8.1.7 zip. Does BEA have a workaround for CMP?

          java.rmi.UnexpectedException: Unexpected exception in
          sync.server.system.SystemSessionDataBean.setSessionData():
          java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER bind
          variable
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
          at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
          at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
          at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
          at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
          at
          oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
          )
          at
          oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
          at
          oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
          :2053)
          at
          oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
          ment.java:398)
          at
          weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
          47)
          at
          sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
          nDataPSWebLogic_CMP_RDBMS.java:318)
          at
          sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
          DataPSWebLogic_CMP_RDBMS.java:284)
          at
          weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
          at
          weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
          a:227)
          at
          weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
          a:355)
          at weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)


          ---
          Using Streams to Avoid Limits on setBytes() and setString()
          There is a limit on the maximum size of the array which can be bound using
          the PreparedStatement class setBytes() method, and on the size of the
          string
          which can be bound using the setString() method.

          Above the limits, which depend on the version of the server you use, you
          should use setBinaryStream() or setCharacterStream() instead.

          When connecting to an Oracle8 database, the limit for setBytes() is 2000
          bytes (the maximum size of a RAW in Oracle8) and the limit for setString()
          is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

          When connecting to an Oracle7 database, the limit for setBytes() is 255
          bytes (the maximum size of a RAW in Oracle7) and the limit for setString()
          is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

          The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed the
          limit
          when using setBytes() or setString(), but you may receive the following
          error:

          ORA-17070: Data size bigger than max size for this type

          Future versions of the Oracle drivers will raise an error if the length
          exceeds these limits.


          • 2. Re: Oracle 8.1.7 driver limit causes problems with CMP
            3004
            The table has only three fields: two IDs (Number(18)) and a Long Raw that we
            are storing a Hashtable in. The field seems to be filled fine most of the
            time. With the old driver, it always works. As soon as we switch the new
            driver in, certain operations fail consistently. I haven't verified that
            the size is indeed > 4k in these cases, but our error matches what others
            have seen. Here's the CMP DD but I doubt that helps...

            <weblogic-rdbms-bean>
            <pool-name>oracle</pool-name>
            <table-name>scc_sm_sys_sess_data</table-name>
            <attribute-map>
            <object-link>
            <bean-field>mlSystemSessionDataID</bean-field>
            <dbms-column>sys_sess_data_id</dbms-column>
            </object-link>
            <object-link>
            <bean-field>mlSystemSessionID</bean-field>
            <dbms-column>sys_sess_id</dbms-column>
            </object-link>
            <object-link>
            <bean-field>mBSessionData</bean-field>
            <dbms-column>sys_sess_data</dbms-column>
            </object-link>

            "Slava Imeshev" <imeshev@yahoo.com> wrote in message
            news:3c3519bf$1@newsgroups.bea.com...
            Hi Joe,

            This limit defines limit written to oracle strings, raws, blobs and clobs
            when setBytes is used. It has nothing to do with the exception you're
            getting.

            Could you show us your CMP deployment descriptor(s)?

            Regards,

            Slava Imeshev


            "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
            news:3c34de87@newsgroups.bea.com...
            The information below is from Oracle's site and has been noted by a few
            people on various message groups. We had upgraded to 8.1.7 but hadn't
            put
            the latest classes12.zip (June 2001) in our classpath. When we do, we
            get
            the following error from the driver/generated code. We believe this is
            because we are hitting the limit cited below. I don't know why the
            Oracle
            driver has this limit, but since WL generates this code for the EB, I
            don't
            see an easy way for us to avoid it.

            Anyone have any comments on this? Is my interpretation of the
            stacktrace
            correct? If we go back to the old classes12.zip (June 2000) then we
            don't
            have this problem. But in addition to wanting to run the matching zip
            file
            with the version of the DB, we also want to use some of the
            functionality
            in
            the 8.1.7 zip. Does BEA have a workaround for CMP?

            java.rmi.UnexpectedException: Unexpected exception in
            sync.server.system.SystemSessionDataBean.setSessionData():
            java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER bind
            variable
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
            at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
            at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
            at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
            at
            oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
            at
            oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
            )
            at
            oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
            at
            oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
            :2053)
            at
            oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
            ment.java:398)
            at
            weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
            47)
            at
            sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
            nDataPSWebLogic_CMP_RDBMS.java:318)
            at
            sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
            DataPSWebLogic_CMP_RDBMS.java:284)
            at
            weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
            at
            weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
            a:227)
            at
            weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
            a:355)
            at
            weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
            >>
            >>
            ---
            Using Streams to Avoid Limits on setBytes() and setString()
            There is a limit on the maximum size of the array which can be bound
            using
            the PreparedStatement class setBytes() method, and on the size of the
            string
            which can be bound using the setString() method.

            Above the limits, which depend on the version of the server you use, you
            should use setBinaryStream() or setCharacterStream() instead.

            When connecting to an Oracle8 database, the limit for setBytes() is 2000
            bytes (the maximum size of a RAW in Oracle8) and the limit for
            setString()
            is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

            When connecting to an Oracle7 database, the limit for setBytes() is 255
            bytes (the maximum size of a RAW in Oracle7) and the limit for
            setString()
            is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

            The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed the
            limit
            when using setBytes() or setString(), but you may receive the following
            error:

            ORA-17070: Data size bigger than max size for this type

            Future versions of the Oracle drivers will raise an error if the length
            exceeds these limits.


            • 3. Re: Oracle 8.1.7 driver limit causes problems with CMP
              3004
              Hi Joe,

              From your CMP DD it's clear that you use WL 5.1. Which service pack
              do you use?

              AFAIR this problem was fixed in WL 6.1, though I'm not sure about
              5.1. Could you use ejbc with -keepgenerated option and look at
              SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
              how bind variable related to you LONG RAW? Is setBytes used? Or
              it's something like setBinaryStream?

              Regards,

              Slava Imeshev

              "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
              news:3c35c15e@newsgroups.bea.com...
              The table has only three fields: two IDs (Number(18)) and a Long Raw that
              we
              are storing a Hashtable in. The field seems to be filled fine most of the
              time. With the old driver, it always works. As soon as we switch the new
              driver in, certain operations fail consistently. I haven't verified that
              the size is indeed > 4k in these cases, but our error matches what others
              have seen. Here's the CMP DD but I doubt that helps...

              <weblogic-rdbms-bean>
              <pool-name>oracle</pool-name>
              <table-name>scc_sm_sys_sess_data</table-name>
              <attribute-map>
              <object-link>
              <bean-field>mlSystemSessionDataID</bean-field>
              <dbms-column>sys_sess_data_id</dbms-column>
              </object-link>
              <object-link>
              <bean-field>mlSystemSessionID</bean-field>
              <dbms-column>sys_sess_id</dbms-column>
              </object-link>
              <object-link>
              <bean-field>mBSessionData</bean-field>
              <dbms-column>sys_sess_data</dbms-column>
              </object-link>

              "Slava Imeshev" <imeshev@yahoo.com> wrote in message
              news:3c3519bf$1@newsgroups.bea.com...
              Hi Joe,

              This limit defines limit written to oracle strings, raws, blobs and
              clobs
              when setBytes is used. It has nothing to do with the exception you're
              getting.

              Could you show us your CMP deployment descriptor(s)?

              Regards,

              Slava Imeshev


              "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
              news:3c34de87@newsgroups.bea.com...
              The information below is from Oracle's site and has been noted by a
              few
              people on various message groups. We had upgraded to 8.1.7 but hadn't
              put
              the latest classes12.zip (June 2001) in our classpath. When we do, we
              get
              the following error from the driver/generated code. We believe this
              is
              because we are hitting the limit cited below. I don't know why the
              Oracle
              driver has this limit, but since WL generates this code for the EB, I
              don't
              see an easy way for us to avoid it.

              Anyone have any comments on this? Is my interpretation of the
              stacktrace
              correct? If we go back to the old classes12.zip (June 2000) then we
              don't
              have this problem. But in addition to wanting to run the matching zip
              file
              with the version of the DB, we also want to use some of the
              functionality
              in
              the 8.1.7 zip. Does BEA have a workaround for CMP?

              java.rmi.UnexpectedException: Unexpected exception in
              sync.server.system.SystemSessionDataBean.setSessionData():
              java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER
              bind
              variable
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
              at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
              at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
              at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
              at
              oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
              at
              oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
              )
              at
              oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
              at
              oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
              :2053)
              at
              oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
              ment.java:398)
              at
              weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
              47)
              at
              sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
              nDataPSWebLogic_CMP_RDBMS.java:318)
              at
              sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
              DataPSWebLogic_CMP_RDBMS.java:284)
              at
              weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
              at
              weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
              a:227)
              at
              weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
              a:355)
              at
              weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
              ---
              Using Streams to Avoid Limits on setBytes() and setString()
              There is a limit on the maximum size of the array which can be bound
              using
              the PreparedStatement class setBytes() method, and on the size of the
              string
              which can be bound using the setString() method.

              Above the limits, which depend on the version of the server you use,
              you
              should use setBinaryStream() or setCharacterStream() instead.

              When connecting to an Oracle8 database, the limit for setBytes() is
              2000
              bytes (the maximum size of a RAW in Oracle8) and the limit for
              setString()
              is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

              When connecting to an Oracle7 database, the limit for setBytes() is
              255
              bytes (the maximum size of a RAW in Oracle7) and the limit for
              setString()
              is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

              The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed the
              limit
              when using setBytes() or setString(), but you may receive the
              following
              error:

              ORA-17070: Data size bigger than max size for this type

              Future versions of the Oracle drivers will raise an error if the
              length
              exceeds these limits.


              • 4. Re: Oracle 8.1.7 driver limit causes problems with CMP
                3004
                We use WL 5.1, SP10. I've noticed that sp11 is now out, but it doesn't seem
                to have any fixes for this problem (it mentions Oracle 8.1.6, but not 8.1.7,
                which seems to be the release in which Oracle started enforcing this limit).
                We're kind of stuck at the moment, I'm surprised no one else has encountered
                this problem with WebLogic (I have seen postings elsewhere about it with
                other AppServers)


                "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                news:3c35f370$3@newsgroups.bea.com...
                Hi Joe,

                From your CMP DD it's clear that you use WL 5.1. Which service pack
                do you use?

                AFAIR this problem was fixed in WL 6.1, though I'm not sure about
                5.1. Could you use ejbc with -keepgenerated option and look at
                SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
                how bind variable related to you LONG RAW? Is setBytes used? Or
                it's something like setBinaryStream?

                Regards,

                Slava Imeshev

                "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                news:3c35c15e@newsgroups.bea.com...
                The table has only three fields: two IDs (Number(18)) and a Long Raw
                that
                we
                are storing a Hashtable in. The field seems to be filled fine most of
                the
                time. With the old driver, it always works. As soon as we switch the
                new
                driver in, certain operations fail consistently. I haven't verified
                that
                the size is indeed > 4k in these cases, but our error matches what
                others
                have seen. Here's the CMP DD but I doubt that helps...

                <weblogic-rdbms-bean>
                <pool-name>oracle</pool-name>
                <table-name>scc_sm_sys_sess_data</table-name>
                <attribute-map>
                <object-link>
                <bean-field>mlSystemSessionDataID</bean-field>
                <dbms-column>sys_sess_data_id</dbms-column>
                </object-link>
                <object-link>
                <bean-field>mlSystemSessionID</bean-field>
                <dbms-column>sys_sess_id</dbms-column>
                </object-link>
                <object-link>
                <bean-field>mBSessionData</bean-field>
                <dbms-column>sys_sess_data</dbms-column>
                </object-link>

                "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                news:3c3519bf$1@newsgroups.bea.com...
                Hi Joe,

                This limit defines limit written to oracle strings, raws, blobs and
                clobs
                when setBytes is used. It has nothing to do with the exception you're
                getting.

                Could you show us your CMP deployment descriptor(s)?

                Regards,

                Slava Imeshev


                "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                news:3c34de87@newsgroups.bea.com...
                The information below is from Oracle's site and has been noted by a
                few
                people on various message groups. We had upgraded to 8.1.7 but
                hadn't
                put
                the latest classes12.zip (June 2001) in our classpath. When we do,
                we
                get
                the following error from the driver/generated code. We believe this
                is
                because we are hitting the limit cited below. I don't know why the
                Oracle
                driver has this limit, but since WL generates this code for the EB,
                I
                don't
                see an easy way for us to avoid it.

                Anyone have any comments on this? Is my interpretation of the
                stacktrace
                correct? If we go back to the old classes12.zip (June 2000) then we
                don't
                have this problem. But in addition to wanting to run the matching
                zip
                file
                with the version of the DB, we also want to use some of the
                functionality
                in
                the 8.1.7 zip. Does BEA have a workaround for CMP?

                java.rmi.UnexpectedException: Unexpected exception in
                sync.server.system.SystemSessionDataBean.setSessionData():
                java.sql.SQLException: ORA-01483: invalid length for DATE or NUMBER
                bind
                variable
                at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
                at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
                at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
                at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
                at
                oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
                at
                oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
                )
                at
                oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
                at
                oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
                :2053)
                at
                oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
                ment.java:398)
                at
                weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
                47)
                at
                sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
                nDataPSWebLogic_CMP_RDBMS.java:318)
                at
                sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
                DataPSWebLogic_CMP_RDBMS.java:284)
                at
                weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
                at
                weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
                a:227)
                at
                weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
                a:355)
                at
                weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
                ---
                Using Streams to Avoid Limits on setBytes() and setString()
                There is a limit on the maximum size of the array which can be bound
                using
                the PreparedStatement class setBytes() method, and on the size of
                the
                string
                which can be bound using the setString() method.

                Above the limits, which depend on the version of the server you use,
                you
                should use setBinaryStream() or setCharacterStream() instead.

                When connecting to an Oracle8 database, the limit for setBytes() is
                2000
                bytes (the maximum size of a RAW in Oracle8) and the limit for
                setString()
                is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

                When connecting to an Oracle7 database, the limit for setBytes() is
                255
                bytes (the maximum size of a RAW in Oracle7) and the limit for
                setString()
                is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

                The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed
                the
                limit
                when using setBytes() or setString(), but you may receive the
                following
                error:

                ORA-17070: Data size bigger than max size for this type

                Future versions of the Oracle drivers will raise an error if the
                length
                exceeds these limits.


                • 5. Re: Oracle 8.1.7 driver limit causes problems with CMP
                  3004
                  I added some debug output to verify that this problem is definitely caused
                  by the WL generated code/Oracle driver. To do this, I used
                  the -keepgenerated code on ejbc. Then I modified the generated code to
                  print the length of the byte array before calling setBytes. I compiled the
                  class and put an updated version in my bean jar.

                  When I run our test suite, I see hundreds of calls to setBytes with sizes
                  such as 315, 368, 1988, 2020. And then occasionally there are sizes of
                  41932 or 19409. These larger sizes are always followed by the ORA-01483
                  exceptions.

                  This appears to be certain confirmation that the problem is caused by the
                  8.1.7 driver's enforcement of the 4k limit on the methods that the
                  WL-generated code is using to map our Java byte[] to our Long Raw/BLOB field
                  in Oracle. Any suggestions for workarounds?


                  "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                  news:3c39f3d8@newsgroups.bea.com...
                  We use WL 5.1, SP10. I've noticed that sp11 is now out, but it doesn't
                  seem
                  to have any fixes for this problem (it mentions Oracle 8.1.6, but not
                  8.1.7,
                  which seems to be the release in which Oracle started enforcing this
                  limit).
                  We're kind of stuck at the moment, I'm surprised no one else has
                  encountered
                  this problem with WebLogic (I have seen postings elsewhere about it with
                  other AppServers)


                  "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                  news:3c35f370$3@newsgroups.bea.com...
                  Hi Joe,

                  From your CMP DD it's clear that you use WL 5.1. Which service pack
                  do you use?

                  AFAIR this problem was fixed in WL 6.1, though I'm not sure about
                  5.1. Could you use ejbc with -keepgenerated option and look at
                  SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
                  how bind variable related to you LONG RAW? Is setBytes used? Or
                  it's something like setBinaryStream?

                  Regards,

                  Slava Imeshev

                  "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                  news:3c35c15e@newsgroups.bea.com...
                  The table has only three fields: two IDs (Number(18)) and a Long Raw
                  that
                  we
                  are storing a Hashtable in. The field seems to be filled fine most of
                  the
                  time. With the old driver, it always works. As soon as we switch the
                  new
                  driver in, certain operations fail consistently. I haven't verified
                  that
                  the size is indeed > 4k in these cases, but our error matches what
                  others
                  have seen. Here's the CMP DD but I doubt that helps...

                  <weblogic-rdbms-bean>
                  <pool-name>oracle</pool-name>
                  <table-name>scc_sm_sys_sess_data</table-name>
                  <attribute-map>
                  <object-link>
                  <bean-field>mlSystemSessionDataID</bean-field>
                  <dbms-column>sys_sess_data_id</dbms-column>
                  </object-link>
                  <object-link>
                  <bean-field>mlSystemSessionID</bean-field>
                  <dbms-column>sys_sess_id</dbms-column>
                  </object-link>
                  <object-link>
                  <bean-field>mBSessionData</bean-field>
                  <dbms-column>sys_sess_data</dbms-column>
                  </object-link>

                  "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                  news:3c3519bf$1@newsgroups.bea.com...
                  Hi Joe,

                  This limit defines limit written to oracle strings, raws, blobs and
                  clobs
                  when setBytes is used. It has nothing to do with the exception
                  you're
                  getting.

                  Could you show us your CMP deployment descriptor(s)?

                  Regards,

                  Slava Imeshev


                  "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                  news:3c34de87@newsgroups.bea.com...
                  The information below is from Oracle's site and has been noted by
                  a
                  few
                  people on various message groups. We had upgraded to 8.1.7 but
                  hadn't
                  put
                  the latest classes12.zip (June 2001) in our classpath. When we
                  do,
                  we
                  get
                  the following error from the driver/generated code. We believe th
                  is
                  is
                  because we are hitting the limit cited below. I don't know why
                  the
                  Oracle
                  driver has this limit, but since WL generates this code for the
                  EB,
                  I
                  don't
                  see an easy way for us to avoid it.

                  Anyone have any comments on this? Is my interpretation of the
                  stacktrace
                  correct? If we go back to the old classes12.zip (June 2000) then
                  we
                  don't
                  have this problem. But in addition to wanting to run the matching
                  zip
                  file
                  with the version of the DB, we also want to use some of the
                  functionality
                  in
                  the 8.1.7 zip. Does BEA have a workaround for CMP?

                  java.rmi.UnexpectedException: Unexpected exception in
                  sync.server.system.SystemSessionDataBean.setSessionData():
                  java.sql.SQLException: ORA-01483: invalid length for DATE or
                  NUMBER
                  bind
                  variable
                  at
                  oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
                  at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
                  at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
                  at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
                  at
                  oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
                  at
                  oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
                  )
                  at
                  oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
                  at
                  oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
                  :2053)
                  at
                  oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
                  ment.java:398)
                  at
                  weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
                  47)
                  at
                  sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
                  nDataPSWebLogic_CMP_RDBMS.java:318)
                  at
                  sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
                  DataPSWebLogic_CMP_RDBMS.java:284)
                  at
                  weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
                  at
                  weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
                  a:227)
                  at
                  weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
                  a:355)
                  at
                  weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
                  ---
                  Using Streams to Avoid Limits on setBytes() and setString()
                  There is a limit on the maximum size of the array which can be
                  bound
                  using
                  the PreparedStatement class setBytes() method, and on the size of
                  the
                  string
                  which can be bound using the setString() method.

                  Above the limits, which depend on the version of the server you
                  use,
                  you
                  should use setBinaryStream() or setCharacterStream() instead.

                  When connecting to an Oracle8 database, the limit for setBytes()
                  is
                  2000
                  bytes (the maximum size of a RAW in Oracle8) and the limit for
                  setString()
                  is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

                  When connecting to an Oracle7 database, the limit for setBytes()
                  is
                  255
                  bytes (the maximum size of a RAW in Oracle7) and the limit for
                  setString()
                  is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

                  The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed
                  the
                  limit
                  when using setBytes() or setString(), but you may receive the
                  following
                  error:

                  ORA-17070: Data size bigger than max size for this type

                  Future versions of the Oracle drivers will raise an error if the
                  length
                  exceeds these limits.


                  • 6. Re: Oracle 8.1.7 driver limit causes problems with CMP
                    3004


                    Joe Herbers wrote:
                    >
                    I added some debug output to verify that this problem is definitely caused
                    by the WL generated code/Oracle driver. To do this, I used
                    the -keepgenerated code on ejbc. Then I modified the generated code to
                    print the length of the byte array before calling setBytes. I compiled the
                    class and put an updated version in my bean jar.

                    When I run our test suite, I see hundreds of calls to setBytes with sizes
                    such as 315, 368, 1988, 2020. And then occasionally there are sizes of
                    41932 or 19409. These larger sizes are always followed by the ORA-01483
                    exceptions.

                    This appears to be certain confirmation that the problem is caused by the
                    8.1.7 driver's enforcement of the 4k limit on the methods that the
                    WL-generated code is using to map our Java byte[] to our Long Raw/BLOB field
                    in Oracle. Any suggestions for workarounds?
                    Actually, it indicates the driver's being caught by the limitation that
                    Oracle itself imposes with setBytes(). This is a known issue I believe, and
                    you should ask support for a patch to ejbc that generates calls to setBinaryStream()
                    rather than setBytes().
                    Joe Weinstein

                    >
                    "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                    news:3c39f3d8@newsgroups.bea.com...
                    We use WL 5.1, SP10. I've noticed that sp11 is now out, but it doesn't
                    seem
                    to have any fixes for this problem (it mentions Oracle 8.1.6, but not
                    8.1.7,
                    which seems to be the release in which Oracle started enforcing this
                    limit).
                    We're kind of stuck at the moment, I'm surprised no one else has
                    encountered
                    this problem with WebLogic (I have seen postings elsewhere about it with
                    other AppServers)


                    "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                    news:3c35f370$3@newsgroups.bea.com...
                    Hi Joe,

                    From your CMP DD it's clear that you use WL 5.1. Which service pack
                    do you use?

                    AFAIR this problem was fixed in WL 6.1, though I'm not sure about
                    5.1. Could you use ejbc with -keepgenerated option and look at
                    SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
                    how bind variable related to you LONG RAW? Is setBytes used? Or
                    it's something like setBinaryStream?

                    Regards,

                    Slava Imeshev

                    "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                    news:3c35c15e@newsgroups.bea.com...
                    The table has only three fields: two IDs (Number(18)) and a Long Raw
                    that
                    we
                    are storing a Hashtable in. The field seems to be filled fine most of
                    the
                    time. With the old driver, it always works. As soon as we switch the
                    new
                    driver in, certain operations fail consistently. I haven't verified
                    that
                    the size is indeed > 4k in these cases, but our error matches what
                    others
                    have seen. Here's the CMP DD but I doubt that helps...

                    <weblogic-rdbms-bean>
                    <pool-name>oracle</pool-name>
                    <table-name>scc_sm_sys_sess_data</table-name>
                    <attribute-map>
                    <object-link>
                    <bean-field>mlSystemSessionDataID</bean-field>
                    <dbms-column>sys_sess_data_id</dbms-column>
                    </object-link>
                    <object-link>
                    <bean-field>mlSystemSessionID</bean-field>
                    <dbms-column>sys_sess_id</dbms-column>
                    </object-link>
                    <object-link>
                    <bean-field>mBSessionData</bean-field>
                    <dbms-column>sys_sess_data</dbms-column>
                    </object-link>

                    "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                    news:3c3519bf$1@newsgroups.bea.com...
                    Hi Joe,

                    This limit defines limit written to oracle strings, raws, blobs and
                    clobs
                    when setBytes is used. It has nothing to do with the exception
                    you're
                    getting.

                    Could you show us your CMP deployment descriptor(s)?

                    Regards,

                    Slava Imeshev


                    "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                    news:3c34de87@newsgroups.bea.com...
                    The information below is from Oracle's site and has been noted by
                    a
                    few
                    people on various message groups. We had upgraded to 8.1.7 but
                    hadn't
                    put
                    the latest classes12.zip (June 2001) in our classpath. When we
                    do,
                    we
                    get
                    the following error from the driver/generated code. We believe th
                    is
                    is
                    because we are hitting the limit cited below. I don't know why
                    the
                    Oracle
                    driver has this limit, but since WL generates this code for the
                    EB,
                    I
                    don't
                    see an easy way for us to avoid it.

                    Anyone have any comments on this? Is my interpretation of the
                    stacktrace
                    correct? If we go back to the old classes12.zip (June 2000) then
                    we
                    don't
                    have this problem. But in addition to wanting to run the matching
                    zip
                    file
                    with the version of the DB, we also want to use some of the
                    functionality
                    in
                    the 8.1.7 zip. Does BEA have a workaround for CMP?

                    java.rmi.UnexpectedException: Unexpected exception in
                    sync.server.system.SystemSessionDataBean.setSessionData():
                    java.sql.SQLException: ORA-01483: invalid length for DATE or
                    NUMBER
                    bind
                    variable
                    at
                    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
                    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
                    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
                    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
                    at
                    oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
                    at
                    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1610
                    )
                    at
                    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1535)
                    at
                    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
                    :2053)
                    at
                    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
                    ment.java:398)
                    at
                    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
                    47)
                    at
                    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.update(SystemSessio
                    nDataPSWebLogic_CMP_RDBMS.java:318)
                    at
                    sync.server.system.SystemSessionDataPSWebLogic_CMP_RDBMS.store(SystemSession
                    DataPSWebLogic_CMP_RDBMS.java:284)
                    at
                    weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
                    at
                    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
                    a:227)
                    at
                    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
                    a:355)
                    at
                    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
                    ---
                    Using Streams to Avoid Limits on setBytes() and setString()
                    There is a limit on the maximum size of the array which can be
                    bound
                    using
                    the PreparedStatement class setBytes() method, and on the size of
                    the
                    string
                    which can be bound using the setString() method.

                    Above the limits, which depend on the version of the server you
                    use,
                    you
                    should use setBinaryStream() or setCharacterStream() instead.

                    When connecting to an Oracle8 database, the limit for setBytes()
                    is
                    2000
                    bytes (the maximum size of a RAW in Oracle8) and the limit for
                    setString()
                    is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

                    When connecting to an Oracle7 database, the limit for setBytes()
                    is
                    255
                    bytes (the maximum size of a RAW in Oracle7) and the limit for
                    setString()
                    is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

                    The 8.1.6 Oracle JDBC drivers may not raise an error if you exceed
                    the
                    limit
                    when using setBytes() or setString(), but you may receive the
                    following
                    error:

                    ORA-17070: Data size bigger than max size for this type

                    Future versions of the Oracle drivers will raise an error if the
                    length
                    exceeds these limits.


                    --
                    B.E.A. is now hiring! (12/14/01) If interested send a resume to joe@bea.com

                    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco, CA
                    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
                    SOFTWARE ENGINEER (DBA) Liberty Corner, NJ
                    SENIOR WEB DEVELOPER San Jose, CA
                    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTH CAROLINA San Jose, CA
                    SR. PRODUCT MANAGER Bellevue, WA
                    SR. WEB DESIGNER San Jose, CA
                    Channel Marketing Manager - EMEA Region London, GBR
                    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
                    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
                    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
                    QUALITY ASSURANCE ENGINEER Redmond, WA
                    Services Development Manager (Business Development Manager - Services) Paris, FRA; Munich, DEU
                    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
                    E-Marketing Programs Specialist EMEA London, GBR
                    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
                    MANAGER, E-SALES Plano, TX
                    • 7. Re: Oracle 8.1.7 driver limit causes problems with CMP
                      3004
                      We received a patch from BEA that appears to fix this problem. It works
                      fine in our testing of the generated CMP Entity Beans. We also changed our
                      own JDBC code to use setBinaryStream instead of setBytes.

                      CR065200_510sp10.jar

                      "Joseph Weinstein" <joe@bea.com> wrote in message
                      news:3C434E76.CE2D874A@bea.com...
                      Joe Herbers wrote:
                      I added some debug output to verify that this problem is definitely
                      caused
                      by the WL generated code/Oracle driver. To do this, I used
                      the -keepgenerated code on ejbc. Then I modified the generated code to
                      print the length of the byte array before calling setBytes. I compiled
                      the
                      class and put an updated version in my bean jar.

                      When I run our test suite, I see hundreds of calls to setBytes with
                      sizes
                      such as 315, 368, 1988, 2020. And then occasionally there are sizes of
                      41932 or 19409. These larger sizes are always followed by the ORA-01483
                      exceptions.

                      This appears to be certain confirmation that the problem is caused by
                      the
                      8.1.7 driver's enforcement of the 4k limit on the methods that the
                      WL-generated code is using to map our Java byte[] to our Long Raw/BLOB
                      field
                      in Oracle. Any suggestions for workarounds?
                      Actually, it indicates the driver's being caught by the limitation that
                      Oracle itself imposes with setBytes(). This is a known issue I believe,
                      and
                      you should ask support for a patch to ejbc that generates calls to
                      setBinaryStream()
                      rather than setBytes().
                      Joe Weinstein
                      "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                      news:3c39f3d8@newsgroups.bea.com...
                      We use WL 5.1, SP10. I've noticed that sp11 is now out, but it
                      doesn't
                      seem
                      to have any fixes for this problem (it mentions Oracle 8.1.6, but not
                      8.1.7,
                      which seems to be the release in which Oracle started enforcing this
                      limit).
                      We're kind of stuck at the moment, I'm surprised no one else has
                      encountered
                      this problem with WebLogic (I have seen postings elsewhere about it
                      with
                      other AppServers)


                      "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                      news:3c35f370$3@newsgroups.bea.com...
                      Hi Joe,

                      From your CMP DD it's clear that you use WL 5.1. Which service pack
                      do you use?

                      AFAIR this problem was fixed in WL 6.1, though I'm not sure about
                      5.1. Could you use ejbc with -keepgenerated option and look at
                      SystemSessionDataPSWebLogic_CMP_RDBMS.java, particularly
                      how bind variable related to you LONG RAW? Is setBytes used? Or
                      it's something like setBinaryStream?

                      Regards,

                      Slava Imeshev

                      "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                      news:3c35c15e@newsgroups.bea.com...
                      The table has only three fields: two IDs (Number(18)) and a Long
                      Raw
                      that
                      we
                      are storing a Hashtable in. The field seems to be filled fine
                      most of
                      the
                      time. With the old driver, it always works. As soon as we switch
                      the
                      new
                      driver in, certain operations fail consistently. I haven't
                      verified
                      that
                      the size is indeed > 4k in these cases, but our error matches what
                      others
                      have seen. Here's the CMP DD but I doubt that helps...
                      "Slava Imeshev" <imeshev@yahoo.com> wrote in message
                      news:3c3519bf$1@newsgroups.bea.com...
                      Hi Joe,

                      This limit defines limit written to oracle strings, raws, blobs
                      and
                      clobs
                      when setBytes is used. It has nothing to do with the exception
                      you're
                      getting.


                      "Joe Herbers" <Joe.Herbers@divine.com> wrote in message
                      news:3c34de87@newsgroups.bea.com...
                      The information below is from Oracle's site and has been noted
                      by
                      a
                      few
                      people on various message groups. We had upgraded to 8.1.7
                      but
                      hadn't
                      put
                      the latest classes12.zip (June 2001) in our classpath. When
                      we
                      do,
                      we
                      get
                      the following error from the driver/generated code. We
                      believe th
                      is
                      is
                      because we are hitting the limit cited below. I don't know
                      why
                      the
                      Oracle
                      driver has this limit, but since WL generates this code for
                      the
                      EB,
                      I
                      don't
                      see an easy way for us to avoid it.

                      Anyone have any comments on this? Is my interpretation of the
                      stacktrace
                      correct? If we go back to the old classes12.zip (June 2000)
                      then
                      we
                      don't
                      have this problem. But in addition to wanting to run the
                      matching
                      zip
                      file
                      with the version of the DB, we also want to use some of the
                      functionality
                      in
                      the 8.1.7 zip. Does BEA have a workaround for CMP?

                      java.rmi.UnexpectedException: Unexpected exception in
                      sync.server.system.SystemSessionDataBean.setSessionData():
                      java.sql.SQLException: ORA-01483: invalid length for DATE or
                      NUMBER
                      bind
                      variable
                      at
                      oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
                      ---
                      Using Streams to Avoid Limits on setBytes() and setString()
                      There is a limit on the maximum size of the array which can be
                      bound
                      using
                      the PreparedStatement class setBytes() method, and on the size
                      of
                      the
                      string
                      which can be bound using the setString() method.

                      Above the limits, which depend on the version of the server
                      you
                      use,
                      you
                      should use setBinaryStream() or setCharacterStream() instead.

                      When connecting to an Oracle8 database, the limit for
                      setBytes()
                      is
                      2000
                      bytes (the maximum size of a RAW in Oracle8) and the limit for
                      setString()
                      is 4000 bytes (the maximum size of a VARCHAR2 in Oracle8).

                      When connecting to an Oracle7 database, the limit for
                      setBytes()
                      is
                      255
                      bytes (the maximum size of a RAW in Oracle7) and the limit for
                      setString()
                      is 2000 bytes (the maximum size of a VARCHAR2 in Oracle7).

                      The 8.1.6 Oracle JDBC drivers may not raise an error if you
                      exceed
                      the
                      limit
                      when using setBytes() or setString(), but you may receive the
                      following
                      error:

                      ORA-17070: Data size bigger than max size for this type

                      Future versions of the Oracle drivers will raise an error if
                      the
                      length
                      exceeds these limits.