What are some specifics for class and meta data in your scenario? Could it be an issue with the data type your are mapping? http://db.apache.org/ojb/jdbc-types.html
-----Original Message----- From: Lucy Zhao [mailto:[EMAIL PROTECTED]] Sent: Friday, February 21, 2003 10:04 AM To: OJB Users List (E-mail) Subject: ClassCastException in OJB 0.9.9 with Oracle 9i Would some one please throw some light on this? In the design, a stateless session bean passes a persistence broker instance to an OJB component that does the CRUD functions. EJB was deployed to JBoss successfully, but when envoking the OJB component, application throws ClassNotFoundException. So I included ojb.jar inside myejb.jar. ClassNotFoundException was fixed and the retrieval of objects works. But when save or store object, a ClassCastException throws. Questions 1) Is it right to include ojb.jar in myejb.jar file? 2) What causes the ClassCastException? OJB 0.9.9 / Oracle 9i (ojdbc14.jar 4/26/2002 11:47AM) / JDK 1.4.1_01 / JBoss 3.0.4 18:51:54,729 ERROR [LogInterceptor] RuntimeException: java.lang.ClassCastException at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement .java:2793) at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement .java:2905) at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(Local PreparedStatement.java:607) at org.apache.ojb.broker.platforms.PlatformDefaultImpl.setObjectForStatement(Un known Source) at org.apache.ojb.broker.platforms.PlatformOracleImpl.setObjectForStatement(Unk nown Source) at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert(Unknown Source) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.storeToDb(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown Source) at org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.store(Unknown Source) ...... 18:51:54,749 WARN [RequestProcessor] Unhandled Exception thrown: class java.rmi .ServerException 18:51:54,749 WARN [jbossweb] WARNING: Exception for /edispatch/updateSiteType.do: java.rmi.ServerException: RuntimeException; nested exception is: java.lang.ClassCastException Lucy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
