[ojb-users] oracle platform
Brought to you by:
thma
From: David R. <cas...@fr...> - 2002-05-24 15:20:04
|
hi all i have some problems running the performance test with an oracle 8.1.7 server it keeps throwing ClassCastException on double values i managed to make it run by patching ojb.broker.platforms.PlatformOracleImpl : public void setObjectForStatement(PreparedStatement ps, int index, Object value, int sqlType) throws SQLException { if (((sqlType == Types.VARBINARY) || (sqlType == Types.LONGVARBINARY)) && (value instanceof byte[])) { byte buf[] = (byte[])value; ByteArrayInputStream inputStream = new ByteArrayInputStream(buf); changePreparedStatementResultSetType(ps); ps.setBinaryStream(index, inputStream, buf.length); // this is where my patch starts } else if (sqlType == Types.FLOAT) { super.setObjectForStatement(ps, index, value, Types.DOUBLE); // this is where my patch ends } else { super.setObjectForStatement(ps, index, value, sqlType); } } i wonder why i need to do this since it seems that ojb has been tested against oracle.... background information : w2k sp2 + sun jdk1.4.0 + latest objectBridge from cvs oracle 8.1.7 on w2k sp2 oracle driver classes12.zip i successfully tested ObjectBridge against DB2 7.1 W2K, MySQL 3.23 linux, MySQL 3.23 W2K so i guess this is _not_ a configuration_ problem... thanks for your help David |