• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Error while calling EJBs

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic