6 Replies Latest reply on Sep 23, 2005 5:59 PM by Marcos Donato

    java.lang.NullPointerException in save of process definition

    Marcos Donato Newbie

      Hello everybody,

      I'm trying to solve this problem by a long time, but with no success, some one can help me?

      134359 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)]] - iniciando metodo: WorkflowBusinessDelegate.java::publicarProcesso(processVo)
       134359 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)]] - iniciando metodo: WorkflowSessionFacadeBean.java::publicarProcesso(processVo)
       134359 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)] [classe=MainWorkflow.java, method=deployProcessDefinition(zipInputStream)]] - iniciando metodo: MainWorkflow.java::deployProcessDefinition(zipInputStream)
       Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_) values (?, ?, ?, ?)
      [20/09/05 17:42:22:435 GMT-03:00] 5c7abce9 GraphSession E org.jbpm.db.GraphSession java.lang.NullPointerException
      [20/09/05 17:42:22:560 GMT-03:00] 5c7abce9 SystemOut O 134906 FATAL ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)] [classe=MainWorkflow.java, method=deployProcessDefinition(zipInputStream)]] - couldn't save process definition 'ProcessDefinition(teste)'
       java.lang.RuntimeException: couldn't save process definition 'ProcessDefinition(teste)'
       at org.jbpm.db.GraphSession.saveProcessDefinition(GraphSession.java:35)
       at br.com.glr.populis.model.workflow.common.MainWorkflow.deployProcessDefinition(MainWorkflow.java:75)
       at br.com.glr.populis.model.workflow.ejb.WorkflowSessionFacadeBean.publicarProcesso(WorkflowSessionFacadeBean.java:51)
       at br.com.glr.populis.model.workflow.ejb.EJSLocalStatelessWorkflowSessionFacade_618810f4.publicarProcesso(EJSLocalStatelessWorkflowSessionFacade_618810f4.java:119)
       at br.com.glr.populis.web.workflow.delegate.WorkflowBusinessDelegate.publicarProcesso(WorkflowBusinessDelegate.java:56)
       at br.com.glr.populis.web.workflow.action.ProcessFormAction.addData(ProcessFormAction.java:25)
       at br.com.glr.populis.webcommon.action.GenericFormMaintenanceAction.executeAddData(GenericFormMaintenanceAction.java:151)
       at br.com.glr.populis.webcommon.action.GenericFormMaintenanceAction.execute(GenericFormMaintenanceAction.java:84)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
       at br.com.glr.populis.webcommon.servlet.PopulisServlet.process(PopulisServlet.java:22)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
       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:283)
       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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
       at br.com.glr.populis.webcommon.controller.filter.LogFilter.doFilter(LogFilter.java:18)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
       at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
       at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
       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:334)
       at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
       at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
       at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
      Caused by: java.lang.NullPointerException
       at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1755)
       at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2178)
       at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:34)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
       at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:240)
       at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
       at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
       at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
       at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
       at org.jbpm.db.GraphSession.saveProcessDefinition(GraphSession.java:31)
       ... 37 more
      [20/09/05 17:42:22:560 GMT-03:00] 5c7abce9 SystemErr R 134906 FATAL ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)] [classe=MainWorkflow.java, method=deployProcessDefinition(zipInputStream)]] - couldn't save process definition 'ProcessDefinition(teste)'
       java.lang.RuntimeException: couldn't save process definition 'ProcessDefinition(teste)'
       at org.jbpm.db.GraphSession.saveProcessDefinition(GraphSession.java:35)
       at br.com.glr.populis.model.workflow.common.MainWorkflow.deployProcessDefinition(MainWorkflow.java:75)
       at br.com.glr.populis.model.workflow.ejb.WorkflowSessionFacadeBean.publicarProcesso(WorkflowSessionFacadeBean.java:51)
       at br.com.glr.populis.model.workflow.ejb.EJSLocalStatelessWorkflowSessionFacade_618810f4.publicarProcesso(EJSLocalStatelessWorkflowSessionFacade_618810f4.java:119)
       at br.com.glr.populis.web.workflow.delegate.WorkflowBusinessDelegate.publicarProcesso(WorkflowBusinessDelegate.java:56)
       at br.com.glr.populis.web.workflow.action.ProcessFormAction.addData(ProcessFormAction.java:25)
       at br.com.glr.populis.webcommon.action.GenericFormMaintenanceAction.executeAddData(GenericFormMaintenanceAction.java:151)
       at br.com.glr.populis.webcommon.action.GenericFormMaintenanceAction.execute(GenericFormMaintenanceAction.java:84)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
       at br.com.glr.populis.webcommon.servlet.PopulisServlet.process(PopulisServlet.java:22)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
       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:283)
       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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
       at br.com.glr.populis.webcommon.controller.filter.LogFilter.doFilter(LogFilter.java:18)
       at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:965)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
       at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
       at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
       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:334)
       at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
       at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
       at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
      Caused by: java.lang.NullPointerException
       at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1755)
       at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2178)
       at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:34)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
       at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:240)
       at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
       at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
       at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
       at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
       at org.jbpm.db.GraphSession.saveProcessDefinition(GraphSession.java:31)
       ... 37 more
      134984 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)] [classe=MainWorkflow.java, method=deployProcessDefinition(zipInputStream)]] - finalizando metodo: MainWorkflow.java::deployProcessDefinition(zipInputStream)
       134984 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)] [sessionFacade=WorkflowSessionFacadeBean.java, method=publicarProcesso(processVo)]] - finalizando metodo: metodo=WorkflowSessionFacadeBean.java::publicarProcesso(processVo)
       135156 DEBUG ctx:[[businessdelegate=WorkflowBusinessDelegate.java, method=publicarProcesso(processVo)]] - finalizando metodo: WorkflowBusinessDelegate.java::publicarProcesso(processVo)
      



      When i use hibernate3 final version this error occurs, but when i use the hibernate3-rc1 this error does not appear, but the container hangs.

      And the rc1 version does not have CMTTransactionFactory, and like i read in documentation, this is the class that i need to use with ejb session bean!

      Thanks for att.