Well... we really don't want to switch BPM engines ATM so here is my stack trace. As can be seen, the error occurs when I try to ask a ContextInstance from my just loaded ProcessInstance, obviously the problem refers to hibernate lazy loading but since I'm not familiar with JBPM hbm mappings I really can't figure it out.
| org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.exe.ProcessInstance.instances | at org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:618) | at org.hibernate.collection.PersistentMap.readFrom(PersistentMap.java:197) | at org.hibernate.loader.Loader.readCollectionElement(Loader.java:674) | at org.hibernate.loader.Loader.readCollectionElements(Loader.java:370) | at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:314) | at org.hibernate.loader.Loader.doQuery(Loader.java:412) | at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) | at org.hibernate.loader.Loader.loadCollection(Loader.java:1434) | at org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111) | at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488) | at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) | at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430) | at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:176) | at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48) | at org.hibernate.collection.PersistentMap.get(PersistentMap.java:123) | at org.jbpm.graph.exe.ProcessInstance.getInstance(ProcessInstance.java:136) | at org.jbpm.graph.exe.ProcessInstance.getContextInstance(ProcessInstance.java:163) | at yetem.teg.server.BrokerImplementation.execute(BrokerImplementation.java:121) | at yetem.teg.server.BrokerImplementation.execute(BrokerImplementation.java:114) | 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 aeglos.interceptors.MethodInterceptorFactory$MethodInvocationImpl.proceed(MethodInterceptorFactory.java:157) | at yetem.teg.security.TokenVerifierMethodInterceptor.invoke(TokenVerifierMethodInterceptor.java:43) | at $MethodInterceptor_1088db08cac.invoke($MethodInterceptor_1088db08cac.java) | at aeglos.interceptors.MethodInterceptorFactory$MethodInterceptorInvocationHandler.invoke(MethodInterceptorFactory.java:110) | at $Proxy0.execute(Unknown Source) | at $Broker_1088db08caf.execute($Broker_1088db08caf.java) | at $Broker_1088db08c96.execute($Broker_1088db08c96.java) | 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 com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157) | at net.sourceforge.hiveremoting.caucho.HessianRemoteServiceInvoker.invoke(HessianRemoteServiceInvoker.java:52) | at net.sourceforge.hiveremoting.caucho.AbstractRemoteServiceInvoker.invoke(AbstractRemoteServiceInvoker.java:78) | at net.sourceforge.hiveremoting.caucho.CauchoRemotingServlet.service(CauchoRemotingServlet.java:181) | at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427) | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:832) | at net.sourceforge.hiveutils.web.HiveMindRegistryPublishFilter.doFilter(HiveMindRegistryPublishFilter.java:76) | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823) | at org.apache.hivemind.servlet.HiveMindFilter.doFilter(HiveMindFilter.java:172) | at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823) | at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:556) | at org.mortbay.http.HttpContext.handle(HttpContext.java:1563) | at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:623) | at org.mortbay.http.HttpContext.handle(HttpContext.java:1515) | at org.mortbay.http.HttpServer.service(HttpServer.java:956) | at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) | at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) | at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) | at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) | at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) | at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) | Just in case is relevant, I'm using MySQL and this is my hibernate.cfg.xml: | <hibernate-configuration> | <session-factory> | | <!-- jdbc connection properties --> | <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> | <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> | <property name="hibernate.connection.url">jdbc:mysql://localhost/teg</property> | <property name="hibernate.connection.username">teg</property> | <property name="hibernate.connection.password">teg</property> | | <!-- c3p0 connection pooling properties | <property name="hibernate.c3p0.min_size">1</property> | <property name="hibernate.c3p0.max_size">3</property> | --> | | <!-- other hibernate properties --> | <property name="hibernate.show_sql">false</property> | | <!--identity mapping files --> | <!-- uncomment if you don't want to use the default jBPM identity mgmgt component | <mapping resource="org/jbpm/identity/User.hbm.xml"/> | <mapping resource="org/jbpm/identity/Group.hbm.xml"/> | <mapping resource="org/jbpm/identity/Membership.hbm.xml"/> | --> | | <!-- graph.def mapping files --> | <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/> | <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/> | <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/> | | <!-- graph.node mapping files --> | <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/State.hbm.xml"/> | <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/> | | <!-- graph.action mapping files --> | <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/> | | <!-- context.def mapping files --> | <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/> | <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/> | | <!-- taskmgmt.def mapping files --> | <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/> | | <!-- module.def mapping files --> | <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/> | | <!-- bytes mapping files --> | <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/> | | <!-- file.def mapping files --> | <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/> | | <!-- scheduler.def mapping files --> | <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/> | <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/> | | <!-- graph.exe mapping files --> | <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/> | <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/> | <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/> | <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/> | | <!-- module.exe mapping files --> | <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/> | | <!-- context.exe mapping files --> | <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/> | <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/> | | <!-- taskmgmt.exe mapping files --> | <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/> | | <!-- scheduler.exe mapping files --> | <mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml"/> | | <!-- logging mapping files --> | <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/> | <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/> | <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/> | <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/> | <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/> | | </session-factory> | </hibernate-configuration> | Here's the code snippet that reproduces the exception: | ProcessInstance instance = jbpmSession.getGraphSession().loadProcessInstance(game.getProcessId()); | | instance.getContextInstance().setTransientVariable(Constants.GAME_VAR, game); | | instance.getContextInstance().setTransientVariable(Constants.REGISTRY_VAR, HiveMindRegistryPublishFilter.getRegistry()); | | instance.getContextInstance().addVariables(arguments); | | instance.signal(commandName); | | jbpmSession.getGraphSession().saveProcessInstance(instance); | Above, in the first line reading instance.getContextInstance()... the exception is thrown. Can somebody help us? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915312#3915312 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915312 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user