I've gotten a bit farther so kindly ignore the last post. Using JOTM and the minimal
spring JNDI implementation I bind the processEngine and the UserContext:
| SimpleNamingContextBuilder builder = new
builder.bind("java:/ProcessEngine",
| builder.bind("UserTransaction", tx.getUserTransaction());
| builder.activate();
All my JPM interaction works fine when I work directly with the processEngine embedded in
my Spring context. If I write I little unit test where I simply instantiate
ProcessManagement and try to retrieve a list of deployed processes it works just fine:
ManagementFactory factory = ManagementFactory.newInstance();
| ProcessManagement service = factory.createProcessManagement();
| List<ProcessDefinitionRef> procs = service.getProcessDefinitions();
| assertNotNull(procs);
But if instead I try to get a deployed process like so:
ProcessInstanceRef proc = service.getProcessInstance("Pipeline_3.one-shot11");
| assertNotNull(proc);
I get an error in org.jboss.bpm.console.server.util.InvocationProxy, right at the line
where the proxy method is invoked. Perhaps someone could tell me what might be different.
The root exception says that "No Hibernate Session bound to thread, and
configuration does not allow creation of non-transactional one here". I don't
see a big difference between the two methods in ProcessManagementImpl.
The stack trace follows:
java.lang.RuntimeException: Unexpected invocation exception: null
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationProxy.java:80)
| at $Proxy3.getProcessInstance(Unknown Source)
| at
com.bluesky.skyline.workflow.integration.ConsoleIntegrationTest.testProcessDelpoy(ConsoleIntegrationTest.java:151)
| 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 junit.framework.TestCase.runTest(TestCase.java:168)
| at junit.framework.TestCase.runBare(TestCase.java:134)
| at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
| 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:124)
| at junit.framework.TestSuite.runTest(TestSuite.java:232)
| at junit.framework.TestSuite.run(TestSuite.java:227)
| at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
| at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
| 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.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.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationProxy.java:64)
| ... 22 more
| Caused by: org.jbpm.pvm.internal.wire.WireException: couldn't initialize object
'org.jbpm.pvm.internal.repository.RepositorySessionImpl': No Hibernate Session
bound to thread, and configuration does not allow creation of non-transactional one here
| at
org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.initialize(ObjectDescriptor.java:233)
| at
org.jbpm.pvm.internal.wire.WireContext.performInitialization(WireContext.java:537)
| at org.jbpm.pvm.internal.wire.WireContext.initialize(WireContext.java:499)
| at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:453)
| at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:441)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:421)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:331)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:707)
| at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:151)
| at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:142)
| at org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:200)
| at org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:189)
| at
org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1096)
| at org.jbpm.integration.console.ModelAdaptor.adoptExecution(ModelAdaptor.java:69)
| at
org.jbpm.integration.console.ProcessManagementImpl.getProcessInstance(ProcessManagementImpl.java:208)
| ... 27 more
| Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and
configuration does not allow creation of non-transactional one here
| at
org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
| at
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:622)
| at
org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:73)
| at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:473)
| at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:452)
| at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:441)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:421)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:331)
| at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:707)
| at
org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.autoWire(ObjectDescriptor.java:294)
| at
org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.initialize(ObjectDescriptor.java:225)
| ... 41 more
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247410#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...