4 Replies Latest reply on Jun 5, 2008 5:35 AM by Tom Baeyens

    hibernate mapping problem

    Charles Souillard Newbie

      Hi Tom,

      sometimes I am getting an error on variableScopes collection. It is not a "permanent" problem as my test is sometimes successful, sometimes failing.

      This is the error I get :

      org.ow2.bonita.facade.exception.BonitaInternalException: Unexpected Exception arrived in Bonita: null index column for collection: org.jbpm.pvm.impl.ExecutionImpl.variableScopes
      at org.ow2.bonita.facade.exception.BonitaInternalException.build(BonitaInternalException.java:35)
      at org.ow2.bonita.facade.APIInterceptor.manageExceptions(APIInterceptor.java:109)
      at org.ow2.bonita.facade.APIInterceptor.invoke(APIInterceptor.java:117)
      at $Proxy3.setProcessInstanceVariable(Unknown Source)
      at org.ow2.bonita.example.carpool.Carpool.afterInstantiate(Carpool.java:89)
      at org.ow2.bonita.example.AbstractExample.launch(AbstractExample.java:77)
      at org.ow2.bonita.example.carpool.AbstractCarpoolTest.instantiate(AbstractCarpoolTest.java:107)
      at org.ow2.bonita.example.carpool.AbstractCarpoolTest.testCarpoolCancelRequest(AbstractCarpoolTest.java:41)
      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 junit.framework.TestCase.runTest(TestCase.java:164)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at junit.framework.TestResult$1.protect(TestResult.java:110)
      at junit.framework.TestResult.runProtected(TestResult.java:128)
      at junit.framework.TestResult.run(TestResult.java:113)
      at junit.framework.TestCase.run(TestCase.java:120)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      Caused by: org.hibernate.HibernateException: null index column for collection: org.jbpm.pvm.impl.ExecutionImpl.variableScopes
      at org.hibernate.persister.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:710)
      at org.hibernate.collection.PersistentList.readFrom(PersistentList.java:379)
      at org.hibernate.loader.Loader.readCollectionElement(Loader.java:1008)
      at org.hibernate.loader.Loader.readCollectionElements(Loader.java:646)
      at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:591)
      at org.hibernate.loader.Loader.doQuery(Loader.java:701)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
      at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
      at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
      at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
      at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
      at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
      at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
      at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
      at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
      at org.jbpm.pvm.impl.ExecutionScopeIterator.findNextExecutionScopeIndex(ExecutionScopeIterator.java:104)
      at org.jbpm.pvm.impl.ExecutionScopeIterator.findNext(ExecutionScopeIterator.java:73)
      at org.jbpm.pvm.impl.ExecutionScopeIterator.hasNext(ExecutionScopeIterator.java:48)
      at org.ow2.bonita.facade.impl.RuntimeAPIImpl.getGlobalVariableScope(RuntimeAPIImpl.java:262)
      at org.ow2.bonita.facade.impl.RuntimeAPIImpl.setProcessInstanceVariable(RuntimeAPIImpl.java:276)
      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.ow2.bonita.facade.APIInterceptor.createEnvAndInvoke(APIInterceptor.java:64)
      at org.ow2.bonita.facade.APIInterceptor.retry(APIInterceptor.java:88)
      at org.ow2.bonita.facade.APIInterceptor.manageExceptions(APIInterceptor.java:99)
      ... 22 more



      I found that on the net dealing with this problem :
      http://forum.hibernate.org/viewtopic.php?t=330

      What do you think ?

      Charles