1 Reply Latest reply on Dec 13, 2006 9:52 PM by Ronald van Kuijk

    Exception while trying to instance process definition

    anu123suya Newbie

      My processdefintion xml file got successfully deployed into the server. Could see an entry for this process in processdefinition table also.

      When i try to run the sample application which tries to create an instance of the process, I am getting an Hibernate exception.

      below is the code sample and exception . Can anyone help me to resolve this issue.

      Thanks




      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

      try
      {
      GraphSession graphSession = jbpmContext.getGraphSession();
      ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("LeaveApproval");
      ProcessInstance processInstance = new ProcessInstance(processDefinition);
      Token token = processInstance.getRootToken();
      token.signal();

      jbpmContext.save(processInstance);
      }
      finally
      {

      jbpmContext.close();
      }



      Exception trace is:
      ------------------------------

      2006-12-08 18:33:39,593 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] Inserting collection: [org.jbpm.graph.exe.ProcessInstance.instances#22]
      2006-12-08 18:33:39,593 DEBUG [org.hibernate.persister.collection.AbstractCollectionPersister] collection was empty
      2006-12-08 18:33:39,593 DEBUG [org.hibernate.transaction.JDBCTransaction] re-enabling autocommit
      2006-12-08 18:33:39,593 DEBUG [org.hibernate.transaction.JDBCTransaction] committed JDBC Connection
      2006-12-08 18:33:39,593 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
      2006-12-08 18:33:39,593 DEBUG [org.hibernate.jdbc.ConnectionManager] closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
      2006-12-08 18:33:39,593 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2006-12-08 18:33:39,593 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test].[jsp]] Servlet.service() for servlet jsp threw exception
      org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.def.ProcessDefinition.definitions
      at org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:652)
      at org.hibernate.collection.PersistentMap.readFrom(PersistentMap.java:222)
      at org.hibernate.loader.Loader.readCollectionElement(Loader.java:994)
      at org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)
      at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:579)
      at org.hibernate.loader.Loader.doQuery(Loader.java:689)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      at org.hibernate.loader.Loader.loadCollection(Loader.java:1916)
      at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)
      at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
      at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1593)
      at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
      at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
      at org.hibernate.collection.PersistentMap.values(PersistentMap.java:198)
      at org.jbpm.graph.exe.ProcessInstance.(ProcessInstance.java:103)
      at org.apache.jsp.InvokeProcess_jsp._jspService(InvokeProcess_jsp.java:66)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)