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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle, JDBC, LONG datatype problem... Help!

Re: Oracle, JDBC, LONG datatype problem... Help!

From: QuestionExchange <USENET_at_questionexchange.com>
Date: 1 Nov 1999 14:45:39 GMT
Message-ID: <2222qx@questionexchange.com>


I believe you will have to use the getBytes() method of the Resultset object.
Let me know if this does not fix the problem. David Miller
> Hi all, I am developping a site with servlets connecting back
to an Oracl DB
> with JDBC. I have two different platform. One is running
Oracle 8.0.5 on NT,
> the other Oracle 8i on HPUX. The databases are the same, one
havn't been
> exported and imported into the other. Everything is working
fine on the NT
> box, but the same servlet code failts on the HPUX machine
with 8i when I try
> to retrieve a Long value. I tried the getString() method, and
I tired to
> read the Stream directly, to no avail. This is what I get:
>
> java.lang.ArrayIndexOutOfBoundsException: 1
> at

oracle.jdbc.ttc7.NonPlsqlTTCColumn.unmarshal(NonPlsqlTTCColumn. java)
> at

oracle.jdbc.ttc7.NonPlsqlTTCDataSet.unmarshalRow(NonPlsqlTTCDat aSet.java)
> at oracle.jdbc.ttc7.TTIrxd.unmarshal(TTIrxd.java)
> at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java)
> at

oracle.jdbc.driver.OracleStatement.fetchNextColumns(OracleState ment.java)
> at

oracle.jdbc.driver.OracleInputStream.needBytes(OracleInputStrea m.java)
> at

oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStre am.java)
> at

oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStre am.java)
> at

oracle.jdbc.driver.OracleStatement.getBytesInternal(OracleState ment.java)
> at

oracle.jdbc.driver.OracleStatement.getStringValue(OracleStateme nt.java)
> at

oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.ja va) at ...
> my code...
>
> Somebody has an idea? I use Long values because varchar2 are
too short for
> what I need, but varchar2 works fine...
>
> Thanks very much!
>
> JP Moresmau
> jeffries_at_indigo.ie
>
>
>
>

--
  This answer is courtesy of QuestionExchange.com   http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6618&cus_id=USENET&qtn_id=3991 Received on Mon Nov 01 1999 - 08:45:39 CST

Original text of this message

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