1 Reply Latest reply on Dec 27, 2005 10:57 PM by Fred Muhlenberg

    JpdlXmlWriter.toString() exception

    Fred Muhlenberg Newbie

      I've been working with jBPM3.0 and have attempted to upgrade to v3.0.2 but have run into a significant problem.

      My process definition is this:

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition
      name="Work2">
      <start-state name="start">
      < transition name="tr1" to="SaveXMLDocument"></ transition>
      </start-state>
      <end-state name="end"></end-state>
      < node name="SaveXMLDocument">
      < transition name="tr1" to="end"></ transition>

      <action class="project.workflow.action.SaveRawXMLDocument" config-type="bean">
      </ node>
      </process-definition>
      (xml slightly twikked to allow for html display)

      I can successfully store this workflow (mirroring code in the tutorial).
      However, when I execute the workflow, I get the following exception:


      13:26:48,792 INFO [STDOUT] org.hibernate.HibernateException: null index column for collecti
      on: 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:36)
      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:1562)
      at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
      at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:85)
      at org.hibernate.collection.PersistentMap.values(PersistentMap.java:198)
      at org.jbpm.graph.exe.ProcessInstance.(ProcessInstance.java:73)
      at project.bean.DocumentProcessingBean.onMessage(DocumentProcessingBean.java:66)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
      at org.jboss.mq.SpySession.run(SpySession.java:333)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:595)

      Additionally, I cannot retreive the XML for this process definition.

      The code:

      .......getGraphSession().getGraphSession();
      ProcessDefinition pd = gs.findLatestProcessDefinition( name );

      String s = JpdlXmlWriter.toString(pd);
      :

      works for the websale process definition but my definition (that was successfully loaded!) generates this exception:

      org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.def.ProcessDefinition.nodes

      Stack Trace


      org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:652)
      org.hibernate.collection.PersistentList.readFrom(PersistentList.java:358)
      org.hibernate.loader.Loader.readCollectionElement(Loader.java:994)
      org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)
      org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:579)
      org.hibernate.loader.Loader.doQuery(Loader.java:689)
      org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      org.hibernate.loader.Loader.loadCollection(Loader.java:1916)
      org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
      org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
      org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1562)
      org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
      org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:85)
      org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:108)
      org.hibernate.collection.PersistentList.size(PersistentList.java:91)
      org.jbpm.jpdl.xml.JpdlXmlWriter.createDomTree(JpdlXmlWriter.java:88)
      org.jbpm.jpdl.xml.JpdlXmlWriter.write(JpdlXmlWriter.java:52)
      org.jbpm.jpdl.xml.JpdlXmlWriter.toString(JpdlXmlWriter.java:33)
      project.servlet.WorkflowAdminServlet.getProcessDefinition(WorkflowAdminServlet.java:207)
      project.servlet.WorkflowAdminServlet.doPost(WorkflowAdminServlet.java:121)
      [snip]

      My question is what changed? What am I doing wrong on the creation side?

      -Fred