9 Replies Latest reply on Nov 30, 2006 7:13 PM by gavin.king

    no value for request parameter: taskId

    juangiovanolli

      Hi:
      i'm a newbie in jboss Seam, and i'm getting a constant error in my project:

      javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalStateException: no value for request parameter: taskId
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       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:131)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy169.startTaskA(Unknown Source)
       at com.santex.darwin.web.sample.Task$$FastClassByCGLIB$$1b0b11e2.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:68)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
       at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
       at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:77)
       at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
       at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$86f5782e.startTaskA(<generated>)
       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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalStateException: no value for request parameter: taskId
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.getRequestParamValueAsLong(BusinessProcessInterceptor.java:125)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.beforeInvocation(BusinessProcessInterceptor.java:59)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:44)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
       at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
       at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:46)
       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.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       ... 83 more
      
      


      the classes involved are:


      package com.santex.darwin.web.sample;
      
      import javax.ejb.Remove;
      
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Begin;
      import org.jboss.seam.annotations.BeginTask;
      import org.jboss.seam.annotations.CreateProcess;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.EndTask;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.core.Jbpm;
      
      /**
       *
       * @author Juan Giovanolli
       * 29/11/2006
       */
      @Name("taskWorkflow")
      public class TaskWorkflow implements Task
      {
       @Out(scope = ScopeType.BUSINESS_PROCESS)
       private String status="";
      
      
      
       /**
       *
       *
       */
       //@Begin(join = true)
       @CreateProcess(definition = "ProcessAbstract")
       public String startProcess() {
       status = "process started";
       vec= "/taskA.xhtml";
       System.out.println("LLLLLLLLLLLLLLLLLLLLLLLLLLLL: " + status);
      
      
       return vec;
      
       }
      
      
       @Remove @Destroy
       public void destroy() {
      
       }
      
      
       public String vec= "vec";
      
      
       public String getVec()
       {
       return vec;
       }
      
      
       public void setVec(String vec)
       {
       this.vec = vec;
       }
      
      
       public String startTaskA()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      
       public String startTaskB()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      
       public String startTaskC()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      
      
      }
      
      
      


      and

      
      package com.santex.darwin.web.sample;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.BeginTask;
      import org.jboss.seam.annotations.CreateProcess;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.EndTask;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.annotations.StartTask;
      
      import com.santex.darwin.web.home.EntityHomeBase;
      
      /**
       *
       * @author Juan Giovanolli
       * 29/11/2006
       */
      @Name("taskA")
      @Stateful
      public class TaskABean implements Task
      {
       private String varA;
      
       //@In String status;
      
      
       public String getVarA()
       {
       return varA;
       }
      
      
      
      
       public void setVarA(String varA)
       {
       this.varA = varA;
       }
      
      
       @Out(scope = ScopeType.BUSINESS_PROCESS)
       private String status="";
      
       public String verLetra() {
       System.out.println("la letra de varA es" + varA);
       return "/taskB.xhtml";
       }
      
       @BeginTask@EndTask
       public String startTaskA() {
       status= "starting task A";
       System.out.println("LLLLLLLLLLLLLLLLLLLLLLLLLLLL: " + status);
       return "/taskB.xhtml";
       }
      
      
       @Remove @Destroy
       public void destroy(){
      
       }
      
      
      
      
       public String startProcess()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      
      
      
       public String startTaskB()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      
      
      
       public String startTaskC()
       {
       // TODO Auto-generated method stub
       return null;
       }
      
      }
      
      


      ANY IDEAS???

      Thanks!!!

        • 1. Re:  no value for request parameter: taskId
          gavin.king

          Show us the view that calls startTaskA(). Does it pass a taskId parameter?

          • 2. Re:  no value for request parameter: taskId
            juangiovanolli

            ok, and this is the sequence if can help you

            createtask.xhtml --- TaskWorkflow.java
            taskA.xhtml ---- taskABean.java

            ------CreateTask.xhtml------

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:s="http://jboss.com/products/seam/taglib">
            <head>
            <title>Login</title>
            </head>
            <body>
            <h1>Login</h1>
            
             <h:form>
            
             <h:outputText value="#{taskWorkflow.vec}"></h:outputText>
             <h:commandButton value="Start Workflow" action="#{taskWorkflow.startProcess}"/>
            
             </h:form>
            
            
            </body>
            </html>
            
            



            -----taskA.xhtml---
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:s="http://jboss.com/products/seam/taglib">
            <head>
            <title>Login</title>
            </head>
            <body>
            <h1>Login</h1>
            
             <h:form>
            
             <h:outputText value="#{taskWorkflow.vec}"></h:outputText>
             <h:commandButton value="Start Workflow" action="#{taskWorkflow.startProcess}"/>
            
             </h:form>
            
            
            </body>
            </html>
            
            
            



            thanks you for the fast answer



            • 3. Re:  no value for request parameter: taskId
              gavin.king

              Huh?? I am expecting to see a valuebinding with #{taskWorkflow.startTaskA}

              Have you looked at the examples of this stuff?

              • 4. Re:  no value for request parameter: taskId
                juangiovanolli

                Sorry gavin. i had copied twice the same code.
                thanks for you patience.
                best regards from argentina


                ---CreateTask.xhtml---

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:s="http://jboss.com/products/seam/taglib">
                <head>
                <title>Login</title>
                </head>
                <body>
                <h1>Login</h1>
                
                 <h:form>
                
                 <h:outputText value="#{taskWorkflow.vec}"></h:outputText>
                 <h:commandButton value="Start Workflow" action="#{taskWorkflow.startProcess}"/>
                
                 </h:form>
                
                
                </body>
                </html>
                
                



                ---taskA.xhtml---

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:s="http://jboss.com/products/seam/taglib">
                <head>
                <title>Login</title>
                </head>
                <body>
                <h1>Login</h1>
                
                 <h:form>
                 <div>
                
                 <h:commandButton value="Login" action="#{taskA.startTaskA}"/>
                 </div>
                 </h:form>
                
                </body>
                </html>
                
                




                • 5. Re:  no value for request parameter: taskId
                  gavin.king

                  You are not passing a taskId. You are not even in a task list!

                  Go and read the documentation and look at the example applications. I don't know what you're trying to do here, but it has nothing to do with @StartTask.

                  • 6. Re:  no value for request parameter: taskId
                    juangiovanolli

                    well, i went to read the documentation and the examples ( jejejeje ).
                    now, i show one "startTask" button for each taskInstance of the process.
                    the problem now is that i get nothing in the taskInstanceList, but i create the process instances in the CreateTask.xhtml.
                    maybe i'm forgetting any tag or annotation.
                    Any ideas?
                    thks



                    ---new taskA.xhtml---

                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:s="http://jboss.com/products/seam/taglib">
                    <head>
                    <title>Login</title>
                    </head>
                    <body>
                    <h1>Login</h1>
                    
                     <h:form>
                    
                     <div>
                     <h:dataTable value="#{taskInstanceList}" var="task" >
                    
                     <h:column>
                     <h:commandButton value="Login" action="#{taskA.startTaskA}" taskInstance="#{task}"/>
                     </h:column>
                     </h:dataTable>
                     </div>
                     </h:form>
                    
                    </body>
                    </html>
                    


                    • 7. Re:  no value for request parameter: taskId
                      juangiovanolli

                      i'm basing my example in the todo example of jboss seam. it's very simple, and is almost equals to that, but in's not working for any reason.
                      the unique difference that i can found is that my app doesn´t include the login part of the todo example.
                      Any ideas.
                      Thanks

                      • 8. Re:  no value for request parameter: taskId

                        Without the login, how do you set the Actor (user) that you are getting tasks for?

                        • 9. Re:  no value for request parameter: taskId
                          gavin.king

                          Right, as per the docs, you need a defined actor id if you expect to find any tasks have been assigned to you.