Oracle10g Jdbc Drivers issue with EJB on Weblogic 7

Discussions

EJB programming & troubleshooting: Oracle10g Jdbc Drivers issue with EJB on Weblogic 7

  1. Hi there, We are facing a critical issue on production environment related to Oracle jdbc drivers. We have a J2EE application with swing client. We are using MVC framework where client calls go to stateless session bean which redirect it to specific POJO which then uses Entity Beans for persistence. We have following environment. JDK1.4.2, Weblogic 7 with SP5, Oracle10g on AIX 5.2 Now the problem is that we were using Oracle 8 jdbc driver classes12.zip for our application. Everything was working smoothly. Recently we moved our weblogic and oracle Servers machines locations, after that movement we started to get an exception when weblogic initializing connection pool that makes connection to a different oracle10g database. Oracle supports ask us to upgrade the jdbc driver. So we moved to 10g driver ojdbc14.jar but during testing one functionality is failing with a exception where rest of application seems to be working fine. The exception occurs when we try to post a record and during the creation of a child entity bean the transactions rollback for some unknown reasons. Using the old oracle8 classes12.zip driver the same code working fine again. We have also tried the classes12.zip driver of Oracle10g but error persist. I have checked the code and deployment descriptors but they seems fine. If i comment the creation of that particular entity bean the parent bean get created successfully and transaction commit successfully. Please also note that we have not created any relation b/w both entity beans not even in the database. They both are sort of independent. Can any one having any idea why Oracle10g driver not working or what might be the problem with our configuration. Any help will be highly appreciated. Please see the Exception below. ########################################################### <Exception from ejbStore: javax.ejb.NoSuchEntityException: Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setup.security.ratinghistory.SecurityRatingHist oryEntityPK@93e447fa' not found. javax.ejb.NoSuchEntityException: Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setup .security.ratinghistory.SecurityRatingHistoryEntityPK@93e447fa' not found. at com.cdc.fms.server.setup.security.ratinghistory.SecurityRatingHistoryEntityBean_7x4361__WebLogic_CMP_RDBMS.__ WL_store(SecurityRatingHistoryEntityBean_7x4361__WebLogic_CMP_RDBMS.java:2208) at com.cdc.fms.server.setup.security.ratinghistory.SecurityRatingHistoryEntityBean_7x4361__WebLogic_CMP_RDBMS.ej bStore(SecurityRatingHistoryEntityBean_7x4361__WebLogic_CMP_RDBMS.java:2012) at weblogic.ejb20.manager.DBManager.storeBean(DBManager.java(Compiled Code)) at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java(Compiled Code)) at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java(Compiled Code)) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java(Compiled Code)) --------------- nested within: ------------------ weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb20.internal.TxManager $TxListener@44a824cd Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setup.security.ratinghistory.SecurityR atingHistoryEntityPK@93e447fa' not found. - with nested exception: [javax.ejb.NoSuchEntityException: Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setu p.security.ratinghistory.SecurityRatingHistoryEntityPK@93e447fa' not found.] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java(Compiled Code)) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java(Compiled Code)) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java(Compiled Code)) at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java(Compiled Code)) at com.cdc.fms.server.common.ConsolidatorSessionBean_fz4673_ELOImpl.processRequest(ConsolidatorSessionBean_fz467 3_ELOImpl.java:57) at com.cdc.fms.server.common.GatewaySessionBean.processRequest(Unknown Source) at com.cdc.fms.server.common.GatewaySessionBean_oehtlw_EOImpl.processRequest(GatewaySessionBean_oehtlw_EOImpl.ja va:407) at com.cdc.fms.server.common.GatewaySessionBean_oehtlw_EOImpl_WLSkel.invoke(Unknown Source) <EJB Exception during invocation from home: com.cdc.fms.server.commo n.GatewaySessionBean_oehtlw_HomeImpl@3e13a4aa threw exception: javax.ejb.EJBException: nested exception is: weblogic.tra nsaction.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb20.internal.TxManager$TxListener@ 44a824cd Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setup.security.ratinghistory.SecurityR atingHistoryEntityPK@93e447fa' not found. - with nested exception: [javax.ejb.NoSuchEntityException: Instance of bean 'SecurityRatingHistoryPost' with primary key 'com.cdc.fms.server.setu p.security.ratinghistory.SecurityRatingHistoryEntityPK@93e447fa' not found.] javax.ejb.EJBException: nested exception is: weblogic.transaction.RollbackException: Unexpected exception in beforeCompl etion: sync=weblogic.ejb20.internal.TxManager$TxListener@44a824cd ##################################################################
  2. I am getting the same type of exception. In case I am moving from WL8.1 SP2 to WL8.1 SP6 and SQLServer2000 to SQLServer2005. We have the same code which works fine in SQLServer2000 and WL8.1 SP6. Please post if anyone was able to findout how to fix this issue.