4 Replies Latest reply on Aug 2, 2006 12:29 PM by Gavin King

    Cannot get @In to work

    Eric Ray Novice

      code snippet...

       @In @Out(scope=ScopeType.SESSION)
       private boolean delete = false;
      


      jsf snippet...
       <h:column>
       <f:facet name="header">
       <h:outputText value="#{pkgHeaders.delete}" />
       </f:facet>
       <h:selectBooleanCheckbox value="#{delete}" />
       </h:column>
      


      exception...
      javax.ejb.EJBException: org.jboss.seam.RequiredException: In attribute requires value for component: packages.delete
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
       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:81)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       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:188)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy661.init(Unknown Source)
       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:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callComponentMethod(Component.java:1334)
       at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1293)
       at org.jboss.seam.Component.getInstance(Component.java:1260)
       at org.jboss.seam.Component.getInstance(Component.java:1246)
       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
       at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
       at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
       at com.sun.el.parser.AstValue.getValue(AstValue.java:85)
       at com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
       at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
       at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
       at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
       at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:822)
       at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:554)
       at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:562)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       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.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)
      

      I must be doing something wrong,but for the life of me I cannot figure it out. I believe I've done everything by the book. Any ideas on why I can't get this right.

      Thanks.
      Eric Ray

        • 1. Re: Cannot get @In to work
          Gavin King Master

          @In(required=false)

          • 2. Re: Cannot get @In to work
            Eric Ray Novice

            Tried that already and got the following exception...

            javax.ejb.EJBException: java.lang.IllegalArgumentException: could not set field value: packages.delete
             at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
             at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
             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:81)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
             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:188)
             at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
             at $Proxy841.init(Unknown Source)
             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:13)
             at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
             at org.jboss.seam.Component.callComponentMethod(Component.java:1334)
             at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1293)
             at org.jboss.seam.Component.getInstance(Component.java:1260)
             at org.jboss.seam.Component.getInstance(Component.java:1246)
             at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
             at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
             at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
             at com.sun.el.parser.AstValue.getValue(AstValue.java:85)
             at com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
             at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
             at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
             at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
             at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:822)
             at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:554)
             at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:562)
             at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457)
             at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             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.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.IllegalArgumentException
             at sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:62)
             at java.lang.reflect.Field.set(Field.java:656)
             at org.jboss.seam.Component.setFieldValue(Component.java:1210)
             ... 107 more
            


            So I discarded this solution as wrong. I'll try to track down why I'm getting this exeption and post a reason when I figure it out. Thanks.

            Eric Ray

            • 3. Re: Cannot get @In to work
              Eric Ray Novice

              No luck resolving the exception when using

              @In(required=false)

              Any ideas on what is wrong.

              Thanks.
              Eric Ray

              • 4. Re: Cannot get @In to work
                Gavin King Master

                Use:

                @In(required=false) @Out(scope=ScopeType.SESSION)
                private Boolean delete;