Stefan Krause [http://community.jboss.org/people/krausest] created the discussion
"How to persist a timer" To view the discussion, visit: http://community.jboss.org/message/629101#629101 -------------------------------------------------------------- I'm failing miserably at persisting a process with a timer. I'm disposing the session before the timer expires. When I call JPAKnowledgeService.loadStatefulKnowledgeSession with the old session id I'm getting an exception. I've attached a test case with a simple maven project. Just use mvn test to see the issue. Any help would be appreciated. java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:101) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:69) at org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:131) at net.stefankrause.jbpm.ProcessRunner.setupSession(ProcessRunner.java:94) at net.stefankrause.jbpm.ProcessRunner.<init>(ProcessRunner.java:49) at net.stefankrause.jbpm.tests.TimerPersistence.testTimerPersistence(TimerPersistence.java:34) 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:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:86) ... 28 more Caused by: java.lang.RuntimeException: Unable to load session snapshot at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:96) at org.drools.persistence.SingleSessionCommandService.initKsession(SingleSessionCommandService.java:229) at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:177) ... 33 more Caused by: java.lang.NullPointerException at org.drools.common.ConcurrentNodeMemories.getNodeMemory(ConcurrentNodeMemories.java:65) at org.drools.common.AbstractWorkingMemory.getNodeMemory(AbstractWorkingMemory.java:1040) at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshaller.java:231) at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshaller.java:203) at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:92) at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:91) ... 35 more -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/629101#629101] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
