[jboss-user] [JBoss Seam] - Seam Jbpm integration problem: Injecting jbpmContext doesnt

jcarlos_andia do-not-reply at jboss.com
Mon Jan 14 18:09:17 EST 2008


Hey guys

I have an approving workflow, for which I have a method with the annotation @CreateProcess that creates a ProcessInstance:


  | 
  | @Stateful
  | @Scope(ScopeType.BUSINESS_PROCESS)
  | @Name("approval")
  | 
  | public class ApprovalAction() implements Serializable, Approval{
  | 
  |    @In(required=false,create=true)
  |    private User user;
  | 
  |    public String createUser(){
  |       someStuff ...
  |    }
  | 
  |    @CreateProcess(definition = "userApprove")
  |    public void saveUser(){
  |       user.saveUser();
  |       createUser(selectedUser);
  |    }
  | 
  | }
  | 

  And after the method "saveUser" executes I got "Transaction begin not detected, try installing transaction:ejb-transaction in components.xml". The stacktrace:

 
  | 17:05:29,699 INFO  [WorkflowAction] Process Instance Created
  | 17:05:29,784 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
  | 17:05:30,515 ERROR [SynchronizationRegistry] Exception processing transaction Synchronization after completion
  | javax.ejb.EJBException: java.lang.IllegalStateException: Transaction begin not detected, try installing transaction:ejb-transaction in components.xml
  |         at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
  |         at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |  

 When I add an entry like this:

<transaction:ejb-transaction/>

It throws an error when starting the server:

 
  | 17:09:23,149 INFO  [Initialization] reading /WEB-INF/components.xml
  | 17:09:23,160 ERROR [[/vgrc_v0_2]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
  | java.lang.RuntimeException: error while reading /WEB-INF/components.xml
  |         at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:136)
  |         at org.jboss.seam.init.Initialization.create(Initialization.java:86)
  |         at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
  |         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
  |         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
  |         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
  |         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
  |         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
  |         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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
  |         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
  |         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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
  |         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
  |         at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
  |         at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
  |         at org.jboss.web.WebModule.startModule(WebModule.java:83)
  |         at org.jboss.web.WebModule.startService(WebModule.java:61)
  |         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  |         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  |         at sun.reflect.GeneratedMethodAccessor5269.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  |         at $Proxy0.start(Unknown Source)
  |         at org.jboss.system.ServiceController.start(ServiceController.java:417)
  |         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy45.start(Unknown Source)
  |         at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
  |         at sun.reflect.GeneratedMethodAccessor5285.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  |         at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  |         at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
  |         at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
  |         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
  |         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy46.start(Unknown Source)
  |         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  |         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  |         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  |         at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  |         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  |         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  |         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  |         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  |         at $Proxy9.deploy(Unknown Source)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  |         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
  |         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
  | Caused by: org.dom4j.DocumentException: Error on line 28 of document  : The prefix "transaction" for element "transaction:ejb-transaction" is not bound. Nested exception: The prefix "transaction" for element "transaction:ejb-transaction" is not bound.
  |         at org.dom4j.io.SAXReader.read(SAXReader.java:482)
  |         at org.dom4j.io.SAXReader.read(SAXReader.java:343)
  |         at org.jboss.seam.util.XML.getRootElement(XML.java:21)
  |         at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:132)
  |         ... 91 more
  | 17:09:23,166 ERROR [StandardContext] Error listenerStart
  |  

I'm using Seam 2.0GA with Jboss-4.2.2.GA.

Thanks in advance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119848#4119848

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119848



More information about the jboss-user mailing list