Al Nadein [http://community.jboss.org/people/matrixpooh] created the discussion
"Re: Obtain a handle to ExecutionImpl from unit tests" To view the discussion, visit: http://community.jboss.org/message/562798#562798 -------------------------------------------------------------- Seems like I'm almost there, but not quite. Failing with org.jbpm.api.JbpmException: *couldn't acquire block of ids* at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.getNextId(DatabaseDbidGenerator.java:65) at org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl.createUser(IdentitySessionImpl.java:60) at org.jbpm.pvm.internal.identity.cmd.CreateUserCmd.execute(CreateUserCmd.java:57) at org.jbpm.pvm.internal.identity.cmd.CreateUserCmd.execute(CreateUserCmd.java:32) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:40) at org.jbpm.pvm.internal.svc.IdentityServiceImpl.createUser(IdentityServiceImpl.java:50) at com.gs.crd.requestmanager.workflow.identity.IdentitySetup.createUsers(IdentitySetup.java:9) at com.gs.crd.requestmanager.service.workflow.command.InitWorkflowServiceForTestsCommand.loadRefData(InitWorkflowServiceForTestsCommand.java:46) at com.gs.crd.requestmanager.service.workflow.command.InitWorkflowServiceForTestsCommand.construct(InitWorkflowServiceForTestsCommand.java:29) at com.gs.crd.requestmanager.service.workflow.command.InitWorkflowServiceForTestsCommand.construct(InitWorkflowServiceForTestsCommand.java:1) at com.gs.crd.requestmanager.service.identity.IdentityTest.initialize(IdentityTest.java:42) 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.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) 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.NullPointerException at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:29) at org.jbpm.pvm.internal.id.AcquireDbidBlockCmd.execute(AcquireDbidBlockCmd.java:12) at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53) at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40) at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56) at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.acquireDbidBlock(DatabaseDbidGenerator.java:76) at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.getNextId(DatabaseDbidGenerator.java:63) ... 34 more Here's my jbpm.test.cfg.xml: > Al Nadein wrote: > <?xml version="1.0" encoding="UTF-8"?> > > <jbpm-configuration> > > <import resource="jbpm.default.cfg.xml" /> > <import resource="jbpm.jpdl.cfg.xml" /> > <import resource="jbpm.identity.cfg.xml" /> > > > <process-engine-context> > > <task-service /> > <repository-service /> > <command-service /> > > <command-service name="txRequiredCommandService"> > <skip-interceptor /> > <retry-interceptor /> > <environment-interceptor /> > <standard-transaction-interceptor /> > </command-service> > > <command-service name="newTxRequiredCommandService"> > <retry-interceptor /> > <environment-interceptor policy="requiresNew" /> > <standard-transaction-interceptor /> > </command-service> > > <hibernate-configuration annotations="enabled"> > <cfg resource="jbpm.hibernate.test.cfg.xml" /> > </hibernate-configuration> > > <hibernate-session-factory /> > > </process-engine-context> > > <transaction-context> > <transaction /> > <hibernate-session /> > </transaction-context> > > </jbpm-configuration> > -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/562798#562798] 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 jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user