EJB Class Cast Expception

66 views
Skip to first unread message

G. Raghavender Raju

unread,
Nov 18, 2009, 1:19:59 AM11/18/09
to bo...@googlegroups.com, vasu.r...@gmail.com

 Hi Team,

I was facing really a problem with EJB class cast excpetion in my current work. So, please look into the below exception and let me know your thoughts to resolve the same.
 
 
[11/17/09 14:43:35:531 IST] 00000030 ContainerMana E CNTR0035E: EJB container caught java.lang.ClassCastException: com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl incompatible with com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl
at com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.checkBackendId(WSRelationalRAAdapter.java:149)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBackendId(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.binding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBinding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.setPMHomeInfo(Unknown Source)
at com.ibm.ejs.container.ContainerManaged2_0BeanO.<init>(ContainerManaged2_0BeanO.java:163)
at com.ibm.ejs.container.ContainerManaged2_0BeanOFactory.create(ContainerManaged2_0BeanOFactory.java:42)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:913)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1016)
at com.ibm.ejs.container.activator.OptCEntityActivationStrategy.atActivate(OptCEntityActivationStrategy.java:131)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:595)
at com.ibm.ejs.container.EJSHome.activateBean_Common(EJSHome.java:1861)
at com.ibm.ejs.container.EJSHome.activateBean_Local(EJSHome.java:1765)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSCMPUserProfileHomeBean_0e3c496f.findByPrimaryKey_Local(EJSCMPUserProfileHomeBean_0e3c496f.java:97)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSLocalCMPUserProfileHome_0e3c496f.findByPrimaryKey(EJSLocalCMPUserProfileHome_0e3c496f.java:68)
at com.ibm.isc.customerfulfillment.oppt.domain.organization.factory.UserProfileBOFactory.getUserProfileBO(UserProfileBOFactory.java:148)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.UserManagerBean.signIn(UserManagerBean.java:2931)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.EJSRemoteStatelessUserManager_cd12d32c.signIn(EJSRemoteStatelessUserManager_cd12d32c.java:472)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr._UserManager_Stub.signIn(_UserManager_Stub.java:868)
at com.ibm.isc.customerfulfillment.oppt.controller.actions.SigninAction.executeAction(SigninAction.java:78)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTAction.executeLongAction(OPPTAction.java:156)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTLongAction.run(OPPTLongAction.java:119)
at java.lang.Thread.run(Thread.java:832)
and is throwing com.ibm.ejs.container.ContainerEJBException: EJB failed to initialize. .
[11/17/09 14:43:35:750 IST] 00000030 ExceptionUtil E CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "findByPrimaryKey". Exception data: com.ibm.ejs.container.ContainerEJBException: EJB failed to initialize.
at com.ibm.ejs.container.ContainerManaged2_0BeanO.<init>(ContainerManaged2_0BeanO.java:168)
at com.ibm.ejs.container.ContainerManaged2_0BeanOFactory.create(ContainerManaged2_0BeanOFactory.java:42)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:913)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1016)
at com.ibm.ejs.container.activator.OptCEntityActivationStrategy.atActivate(OptCEntityActivationStrategy.java:131)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:595)
at com.ibm.ejs.container.EJSHome.activateBean_Common(EJSHome.java:1861)
at com.ibm.ejs.container.EJSHome.activateBean_Local(EJSHome.java:1765)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSCMPUserProfileHomeBean_0e3c496f.findByPrimaryKey_Local(EJSCMPUserProfileHomeBean_0e3c496f.java:97)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSLocalCMPUserProfileHome_0e3c496f.findByPrimaryKey(EJSLocalCMPUserProfileHome_0e3c496f.java:68)
at com.ibm.isc.customerfulfillment.oppt.domain.organization.factory.UserProfileBOFactory.getUserProfileBO(UserProfileBOFactory.java:148)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.UserManagerBean.signIn(UserManagerBean.java:2931)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.EJSRemoteStatelessUserManager_cd12d32c.signIn(EJSRemoteStatelessUserManager_cd12d32c.java:472)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr._UserManager_Stub.signIn(_UserManager_Stub.java:868)
at com.ibm.isc.customerfulfillment.oppt.controller.actions.SigninAction.executeAction(SigninAction.java:78)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTAction.executeLongAction(OPPTAction.java:156)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTLongAction.run(OPPTLongAction.java:119)
at java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.ClassCastException: com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl incompatible with com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl
at com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.checkBackendId(WSRelationalRAAdapter.java:149)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBackendId(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.binding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBinding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.setPMHomeInfo(Unknown Source)
at com.ibm.ejs.container.ContainerManaged2_0BeanO.<init>(ContainerManaged2_0BeanO.java:163)
at com.ibm.ejs.container.ContainerManaged2_0BeanOFactory.create(ContainerManaged2_0BeanOFactory.java:42)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:913)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1016)
at com.ibm.ejs.container.activator.OptCEntityActivationStrategy.atActivate(OptCEntityActivationStrategy.java:131)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:595)
at com.ibm.ejs.container.EJSHome.activateBean_Common(EJSHome.java:1861)
at com.ibm.ejs.container.EJSHome.activateBean_Local(EJSHome.java:1765)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSCMPUserProfileHomeBean_0e3c496f.findByPrimaryKey_Local(EJSCMPUserProfileHomeBean_0e3c496f.java:97)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSLocalCMPUserProfileHome_0e3c496f.findByPrimaryKey(EJSLocalCMPUserProfileHome_0e3c496f.java:68)
at com.ibm.isc.customerfulfillment.oppt.domain.organization.factory.UserProfileBOFactory.getUserProfileBO(UserProfileBOFactory.java:148)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.UserManagerBean.signIn(UserManagerBean.java:2931)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.EJSRemoteStatelessUserManager_cd12d32c.signIn(EJSRemoteStatelessUserManager_cd12d32c.java:472)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr._UserManager_Stub.signIn(_UserManager_Stub.java:868)
at com.ibm.isc.customerfulfillment.oppt.controller.actions.SigninAction.executeAction(SigninAction.java:78)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTAction.executeLongAction(OPPTAction.java:156)
at com.ibm.isc.customerfulfillment.oppt.controller.OPPTLongAction.run(OPPTLongAction.java:119)
at java.lang.Thread.run(Thread.java:832)

[11/17/09 14:43:35:937 IST] 00000030 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "signIn" on bean "BeanId(OPPTTechnicalUpgradeEAR#OPPTTechnicalUpgradeEJB.jar#UserManager, null)". Exception data: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: java.lang.ClassCastException: com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl incompatible with com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl
java.lang.ClassCastException: com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl incompatible with com/ibm/ws/rsadapter/cci/WSRdbConnectionFactoryImpl
at com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.checkBackendId(WSRelationalRAAdapter.java:149)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBackendId(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.binding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanClassExtensionImpl.checkBinding(Unknown Source)
at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.setPMHomeInfo(Unknown Source)
at com.ibm.ejs.container.ContainerManaged2_0BeanO.<init>(ContainerManaged2_0BeanO.java:163)
at com.ibm.ejs.container.ContainerManaged2_0BeanOFactory.create(ContainerManaged2_0BeanOFactory.java:42)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:913)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1016)
at com.ibm.ejs.container.activator.OptCEntityActivationStrategy.atActivate(OptCEntityActivationStrategy.java:131)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:595)
at com.ibm.ejs.container.EJSHome.activateBean_Common(EJSHome.java:1861)
at com.ibm.ejs.container.EJSHome.activateBean_Local(EJSHome.java:1765)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSCMPUserProfileHomeBean_0e3c496f.findByPrimaryKey_Local(EJSCMPUserProfileHomeBean_0e3c496f.java:97)
at com.ibm.isc.customerfulfillment.oppt.persistence.organization.EJSLocalCMPUserProfileHome_0e3c496f.findByPrimaryKey(EJSLocalCMPUserProfileHome_0e3c496f.java:68)
at com.ibm.isc.customerfulfillment.oppt.domain.organization.factory.UserProfileBOFactory.getUserProfileBO(UserProfileBOFactory.java:148)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.UserManagerBean.signIn(UserManagerBean.java:2931)
at com.ibm.isc.customerfulfillment.oppt.service.orgmgr.EJSRemoteStatelessUserManager_cd12d32c.signIn(EJSRemoteStatelessUserManager_cd12d32c.java:472)
at


--
Thanks & Regards
G. Raghavender Raju

Raghavan.30May1981_GMail

unread,
Nov 26, 2009, 3:10:24 AM11/26/09
to bo...@googlegroups.com
Hi Raghavendar,
 
   Was the issue resolved? By looking at the second highlighted portion, it might be due to the fact that the "RMIC Generation" was not proper and complete and because of which this error might be thrown. Just have a check.

Cheers,
Raghavan alias Saravanan M.
http://groups.google.com/group/S_H_a_D_E

"Life's harsh truth is that people come when in need that is not 'ours' but 'theirs'." - Wisemen


--

You received this message because you are subscribed to the Google Groups "Bangalore Open Java Users Group- BOJUG" group.
To post to this group, send email to bo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bojug?hl=.

Santhi,Jeba

unread,
Nov 26, 2009, 10:17:30 AM11/26/09
to bo...@googlegroups.com
HI
   Yes its correct. You need to delete all the stubs and skeleton's from the worskspace and do the clean and build the complete projects once again. That will re-generate all the new method's added in the EJB classes, that will solve this problem.
 
-Jeba

To unsubscribe from this group, send email to bojug+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bojug?hl=en.



--
Thanks,
Santhi
Reply all
Reply to author
Forward
0 new messages