I tried to save very simple value to oracle by using sequence as my id generator. I stepped thru the object value and confirmed that my id field is obtained correctly from the sequence but when hibernate save the object to database somehow the id field turns out to be some funny value and when reading it back i got this error
java.lang.ArrayIndexOutOfBoundsException: -124 at oracle.sql.LnxLibThin.lnxnuc(LnxLibThin.java:6036) at oracle.sql.NUMBER.toInt(NUMBER.java:412) at oracle.jdbc.dbaccess.DBConversion.NumberBytesToInt(DBConversion.java:2884)
I did try to use long type but also get this error java.sql.SQLException: Overflow Exception at oracle.sql.NUMBER.toLong(NUMBER.java:376) at oracle.jdbc.dbaccess.DBConversion.NumberBytesToLong(DBConversion.java:2915)
I met the same problem .I use hibernate 2.1.6. who can help me
Joined: Nov 30, 2002
chanaporn temaismithi: My problem has resolved. The reason is the dialect used is net.sf.hibernate.dialect.Oracle9Dialect,but my dirver is older though it is for oracle 9i.I get a newer oracle 9i driver , it disappear .Hope this can help you.