File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Error while calling EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Error while calling EJBs" Watch "Error while calling EJBs" New topic
Author

Error while calling EJBs

Vishnu Munnangi
Ranch Hand

Joined: Sep 28, 2004
Posts: 114
Hi Everyone,
Sorry for the long post. I am new to WSAD and I am learning it. I have developed a small application, which saves employee details to the database. I am using db2 as backend data base. For this I am using a servlet, which calls a stateless session bean. and the stateless session bean inturn calls CMPEntity bean to store the employee details to the database. I have applied all the logic and I have completed the mapping to the database and generated deploy code.
After Starting the server, When I am trying to save the employeeInformation from a servlet to Session Bean bean(which calls entity bean), I am getting the following Error.
Can any one please explain what might be the reason for this error.

Thanks in Advance.
Vishnu

Error 500: Server caught unhandled exception from servlet [EmpServlet]: javax.transaction.TransactionRolledbackException: com.ibm.websphere.csi.CSITransactionRolledbackException: null; nested exception is: javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@2ed55550 javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@2ed55550 com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@2ed55550 at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(DataAccessRequestImpl.java:127) at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.executeCreate(CBStatefulPersistor.java:229) at com.ibm.ws.ejbpersistence.beanextensions.CBNotExistState.ejbCreate(CBNotExistState.java:38) at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.ejbPostCreate(CBStatefulPersistor.java:94) at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbPostCreate(ConcreteBeanStatefulInstanceExtensionImpl.java:133) at myPackage.ConcreteEmployeeEntity_7d09dcba.ejbPostCreate(ConcreteEmployeeEntity_7d09dcba.java:349) at myPackage.EJSCMPEmployeeEntityHomeBean_7d09dcba.create_Local(EJSCMPEmployeeEntityHomeBean_7d09dcba.java:125) at myPackage.EJSLocalCMPEmployeeEntityHome_7d09dcba.create(EJSLocalCMPEmployeeEntityHome_7d09dcba.java:92) at myPackage.MediatorBeanBean.saveEmployeeDetails(MediatorBeanBean.java:80) at myPackage.EJSLocalStatelessMediatorBean_5b3a0ade.saveEmployeeDetails(EJSLocalStatelessMediatorBean_5b3a0ade.java:47) at com.example.web.EmpServlet.doPost(EmpServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592) ---- Begin backtrace for nested exception COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001 at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(Unknown Source) at myPackage.websphere_deploy.DB2UDBNT_V8_1.EmployeeEntityBeanFunctionSet_7d09dcba.Create(EmployeeEntityBeanFunctionSet_7d09dcba.java:189) at myPackage.websphere_deploy.DB2UDBNT_V8_1.EmployeeEntityBeanFunctionSet_7d09dcba.execute(EmployeeEntityBeanFunctionSet_7d09dcba.java:872) at com.ibm.ws.rsadapter.cci.WSInteractionImpl.execute(WSInteractionImpl.java:156) at com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.executeCreate(WSRelationalRAAdapter.java:179) at com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(DataAccessRequestImpl.java:86) at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.executeCreate(CBStatefulPersistor.java:229) at com.ibm.ws.ejbpersistence.beanextensions.CBNotExistState.ejbCreate(CBNotExistState.java:38) at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.ejbPostCreate(CBStatefulPersistor.java:94) at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbPostCreate(ConcreteBeanStatefulInstanceExtensionImpl.java:133) at myPackage.ConcreteEmployeeEntity_7d09dcba.ejbPostCreate(ConcreteEmployeeEntity_7d09dcba.java:349) at myPackage.EJSCMPEmployeeEntityHomeBean_7d09dcba.create_Local(EJSCMPEmployeeEntityHomeBean_7d09dcba.java:125) at myPackage.EJSLocalCMPEmployeeEntityHome_7d09dcba.create(EJSLocalCMPEmployeeEntityHome_7d09dcba.java:92) at myPackage.MediatorBeanBean.saveEmployeeDetails(MediatorBeanBean.java:80) at myPackage.EJSLocalStatelessMediatorBean_5b3a0ade.saveEmployeeDetails(EJSLocalStatelessMediatorBean_5b3a0ade.java:47) at com.example.web.EmpServlet.doPost(EmpServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592) javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@2ed55550 at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.executeCreate(CBStatefulPersistor.java:244) at com.ibm.ws.ejbpersistence.beanextensions.CBNotExistState.ejbCreate(CBNotExistState.java:38) at com.ibm.ws.ejbpersistence.beanextensions.CBStatefulPersistor.ejbPostCreate(CBStatefulPersistor.java:94) at com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensionImpl.ejbPostCreate(ConcreteBeanStatefulInstanceExtensionImpl.java:133) at myPackage.ConcreteEmployeeEntity_7d09dcba.ejbPostCreate(ConcreteEmployeeEntity_7d09dcba.java:349) at myPackage.EJSCMPEmployeeEntityHomeBean_7d09dcba.create_Local(EJSCMPEmployeeEntityHomeBean_7d09dcba.java:125) at myPackage.EJSLocalCMPEmployeeEntityHome_7d09dcba.create(EJSLocalCMPEmployeeEntityHome_7d09dcba.java:92) at myPackage.MediatorBeanBean.saveEmployeeDetails(MediatorBeanBean.java:80) at myPackage.EJSLocalStatelessMediatorBean_5b3a0ade.saveEmployeeDetails(EJSLocalStatelessMediatorBean_5b3a0ade.java:47) at com.example.web.EmpServlet.doPost(EmpServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592) at com.ibm.ejs.container.util.ExceptionUtil.mapCSIException(ExceptionUtil.java:51) at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:85) at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:195) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:2858) at myPackage.EJSLocalCMPEmployeeEntityHome_7d09dcba.create(EJSLocalCMPEmployeeEntityHome_7d09dcba.java:117) at myPackage.MediatorBeanBean.saveEmployeeDetails(MediatorBeanBean.java:80) at myPackage.EJSLocalStatelessMediatorBean_5b3a0ade.saveEmployeeDetails(EJSLocalStatelessMediatorBean_5b3a0ade.java:47) at com.example.web.EmpServlet.doPost(EmpServlet.java:43) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592) ; nested exception is: javax.ejb.EJBException: nested exception is: com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E: Error using adapter to create or execute an Interaction. com.ibm.ws.rsadapter.cci.WSInteractionImpl@2ed55550
Kalidoss Sivasamy
Greenhorn

Joined: Nov 20, 2003
Posts: 7
Vishnu,

I think your problem may be from your Entity Bean. Container found an unhandled exception and threw an EJBException back to the bean. Also, when there is a runtime exception like this, container will Rollback the exception and log the error. I am guessing you are using a Local interface?

Your problem seems to be in the following statement:
CLI0109E String data right truncation. SQLSTATE=22001 at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source) at

Also, check the server log.
 
jQuery in Action, 2nd edition
 
subject: Error while calling EJBs
 
Similar Threads
Oracle 8 DB CMP access with WSAD 5.0
Oracle 8 DB CMP access with WSAD 5.0
PersistenceManagerException in ejbCreate
Autoincrement field in cloudscape
com.ibm.ws.rsadapter Exception