Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Jdbc Exception?

Re: Oracle Jdbc Exception?

From: Marc Cooperman <coopman_at_jumpstart-tech.com>
Date: Thu, 28 Oct 1999 20:43:24 -0400
Message-ID: <g06S3.285$3p5.14135@reader1.interactive.net>


It's a bug in the driver. The limit is 2000 bytes, I think. If you are using a different Oracle version JDBC driver against this DB, such as 8.0.x, try matching the driver version (@ www.oracle.com).

Oracle may tell you the workaround is setUnicodeStream() - but I have found that is unreliable.

setAsciiStream() doesn't work either.

Maybe if enough people complain, Oracle will fix this. I didn't have much luck back in July though...

Marc

Jeffery Cann <Jeffery_Cann_at_mcgraw-hill.com> wrote in message news:381888C1.6E291016_at_mcgraw-hill.com...
> Hello.
>
> I am using the Oracle Jdbc drivers (classes111.zip) and an Oracle 7.3.x
> database. In the database, I am storing serialized Java objects as byte
> streams into LONG RAW (binary) columns.
>
> Occasionally, I have observed the following exception:
> java.sql.SQLException: Bigger type length than Maximum
>
> It would appear that a particular serialized object is too big for the
> LONG RAW column. However, the size of the serialized objects in
> question is no where near the 2 GB maxmimum size.
>
> Based on the stack trace (below) I suspect that Oracle's Jdbc driver has
> a maxmimum buffer size for the PreparedStatment.setBytes( ) method.
>
> Has anyone else run into this problem? If so, is there a workaround for
> Oracle 7.3.x running the JDBC 1.0 drivers (classes111.zip)?
>
> Thanks.
> Jeffery Cann
>
> --------------- stack trace ----------------------------------------
> java.sql.SQLException: Bigger type length than Maximum
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Compiled Code)
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.sql.SQLException.<init>(SQLException.java:82)
> at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:425)
> at oracle.jdbc.ttc7.TTCInBuffer.buffer2Value(Compiled Code)
> at oracle.jdbc.ttc7.TTCInBuffer.get4Bytes(Compiled Code)
> at oracle.jdbc.ttc7.TTIMsg.unmarshalUB4(Compiled Code)
> at oracle.jdbc.ttc7.TTIrid.unmarshal(Compiled Code)
> at oracle.jdbc.ttc7.TTIoer.unmarshal(Compiled Code)
> at oracle.jdbc.ttc7.Oopen.receive(Compiled Code)
> at oracle.jdbc.ttc7.TTC7Protocol.open(Compiled Code)
> at oracle.jdbc.driver.OracleStatement.<init>(Compiled Code)
> at oracle.jdbc.driver.OraclePreparedStatement.<init>(Compiled
> Code)
> at oracle.jdbc.driver.OracleConnection.prepareStatement(Compiled
> Code)
>
Received on Thu Oct 28 1999 - 19:43:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US