5 Replies Latest reply on Mar 30, 2009 5:11 PM by Michael Wohlfart

    can't inject TaskInstance with @In, causes Exception

    Jack Strong Newbie

      Hi,


      I'm working with Seam and jBPM.


      I start a task and I want to get the name of the TaskInstance. So I try to inject the TaskInstance:



      @In TaskInstance task;




      This causes the folowing exception:




      org.jboss.seam.RequiredException: @In attribute requires non-null value: pasis_offen.task
           org.jboss.seam.Component.getValueToInject(Component.java:2297)
           org.jboss.seam.Component.injectAttributes(Component.java:1703)
           org.jboss.seam.Component.inject(Component.java:1521)
           org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
           org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65)
           org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
           org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
           org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
           org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
           org.jboss.seam.example.todo.Pasis_Offen_$$_javassist_4.getThema(Pasis_Offen_$$_javassist_4.java)
           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           java.lang.reflect.Method.invoke(Method.java:597)
           javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
           javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
           com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
           org.apache.el.parser.AstValue.getValue(AstValue.java:118)
           org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
           javax.faces.component.UIOutput.getValue(UIOutput.java:184)
           com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
           com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
           com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
           javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
           javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
           javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
           com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
           com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
           org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:87)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)






      What could be the reason that the @In attribute has a null value? I guess the task is already started. I don't understand that....


      Your help would be appreciated!!!


      Best Regards