1 2 Previous Next 17 Replies Latest reply on May 17, 2009 7:48 AM by Gembit Soultan

    Seam: @In attribute requires non-null value

    koen Newbie

      I have a JSF page containing a datatable showing a list of customers retrieved from the database. The datatable is linked with a backing bean which retrieves the customers from database using a hibernate session.


      The last column of each row in the table has a button. When pressed it will call a method on the backing bean to retrieve the details of that customer.


      I made this entirely based on the hibernate example supplied with seam.


      I got it working so that the customers are retrieved by the backing bean from the injected hibernate session. The problem is that when I press the button, an ajax call is made to the backing bean, but here it goes wrong. I get an exception:


      
      Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: userTableDataModel.bookingDatabase
      
           at org.jboss.seam.Component.getValueToInject(Component.java:2168)
      
           at org.jboss.seam.Component.injectAttributes(Component.java:1598)
      
           at org.jboss.seam.Component.inject(Component.java:1416)
      
           at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
      
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
           at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
      
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      
           at be.application.UserTableBean_$$_javassist_1.setDataTable(UserTableBean_$$_javassist_1.java)
      
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      
           at java.lang.reflect.Method.invoke(Unknown Source)
      
           at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
      
           ... 52 more
      
      



      Fact is that it wasn't null when the datatable was loaded the first time. Apparantly it gets null when a second method on the backing bean is invoked.


      I tried about everything, but I cannot figure out why I'm getting this.
      Any help would be greatly appreciated.


      I'm using:


      Seam 2.0.1
      JBoss 4.2
      Trinidad, Richfaces, Tomahawk


      My code:


      
      Name("userTableDataModel")
      
      @Scope(ScopeType.SESSION)
      
      public class UserTableBean implements Serializable {
      
      
           @In
      
           Session bookingDatabase;
      
           public List getListAll() {
      
                customerList = bookingDatabase.createQuery("select c from CustomerTO as c").list();
      
                return customerList;
      
           }
      
      
      public void showDetails()
      
      {
      
      System.out.println("Showing detail");
      
      }
      
      }
      
      



      As you see the show detail is not doing anything besides printing something in the log -- untill now it doesn't get invoked since I'm getting the error prior the method could be invoked.


      My faces config:


      
      <faces-config>
      
           <managed-bean>
      
                <managed-bean-name>userTableDataModel</managed-bean-name>
      
                <managed-bean-class>
      
                     be.application.UserTableBean
      
                </managed-bean-class>
      
                <managed-bean-scope>session</managed-bean-scope>
      
                </managed-bean>
      
      </faces-config>
      
      



      The relevant parts of web.xml


      
           <filter>
      
                <filter-name>Seam Filter</filter-name>
      
                <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
      
           </filter>
      
      
           <filter>
      
                <filter-name>Seam Exception Filter</filter-name>
      
                <filter-class>
      
                     org.jboss.seam.servlet.SeamExceptionFilter
      
                </filter-class>
      
           </filter>
      
      
           <filter-mapping>
      
                <filter-name>Seam Filter</filter-name>
      
                <url-pattern>/*</url-pattern>
      
           </filter-mapping>
      
      
           <filter-mapping>
      
                <filter-name>Seam Exception Filter</filter-name>
      
                <url-pattern>*.jsf</url-pattern>
      
           </filter-mapping>
      
      
           <listener>
      
                <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
      
           </listener>
      
      
           <servlet>
      
                <servlet-name>Faces Servlet</servlet-name>
      
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      
                <load-on-startup>1</load-on-startup>
      
           </servlet>
      
      
           <servlet-mapping>
      
                <servlet-name>Faces Servlet</servlet-name>
      
                <url-pattern>*.jsf</url-pattern>
      
           </servlet-mapping>
      
      
           <servlet-mapping>
      
                <servlet-name>Faces Servlet</servlet-name>
      
                <url-pattern>/faces/*</url-pattern>
      
           </servlet-mapping>
      
      



      Components.xml


      
           <core:manager conversation-timeout="120000"
      
                concurrent-request-timeout="500" conversation-id-parameter="cid" />
      
      
           <persistence:hibernate-session-factory
      
                name="hibernateSessionFactory" />
      
      
           <persistence:managed-hibernate-session name="bookingDatabase"
      
                session-factory="#{hibernateSessionFactory}" auto-create="true" />
      
      
           <transaction:hibernate-transaction session="#{bookingDatabase}" />
      
      
      




      Hibernate config:


      
      <hibernate-configuration>
      
          <session-factory name="java:/bookingDatabase">
      
              <property name="show_sql">true</property>
      
              <property name="connection.datasource">java:jdbc/db</property>
      
              <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
      
              <property name="transaction.flush_before_completion">true</property>
      
              <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
      
                <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
      
                <mapping resource="be/backend/Customer.hbm.xml"/>
      
                <mapping resource="be/backend/Product.hbm.xml"/>
      
          </session-factory>
      
      </hibernate-configuration>
      
      



      The command button to get the details:


      
                               <a4j:commandButton id="show_detail"
      
                                    action="#{userTableDataModel.showDetail}"
      
                                    value="#{msg['userinformation.showdetail']}"
      
      

        • 1. Re: Seam: @In attribute requires non-null value
          Gavin King Master

          You'll have to put the Seam sourcecode in your sourcepath and use your debugger to find out why Component.getInstance("bookingDatabase") returns null.

          • 2. Re: Seam: @In attribute requires non-null value
            Daniel Hinojosa Master

            I think you have two binding declarations.


            One in the bean....


            Name("userTableDataModel")
            @Scope(ScopeType.SESSION)
            public class UserTableBean implements Serializable



            and one in faces-config.xml


            <faces-config>
                 <managed-bean>
                      <managed-bean-name>userTableDataModel</managed-bean-name>
                      <managed-bean-class>
                           be.application.UserTableBean
                      </managed-bean-class>
                      <managed-bean-scope>session</managed-bean-scope>
                      </managed-bean>
            </faces-config>



            and I bet the the faces-config.xml binding is interfering with the injection.


            Just a guess, comment the faces-config declaration out and try it.

            • 3. Re: Seam: @In attribute requires non-null value
              gabir gabirad Newbie

              Hi guys,


              I have a similar problem and I'm really stuck.


              I use seam-gen for this project (Seam 2.0.1, JSF , RichFaces)


              I'm using entity's from another application, deployed on the same server(JBOSS-4.2.2.GA).The otherappclient.jar is on myApp.ear also.


              The entity's are annotated correctly (with the @Name)


              @Entity
               @Name("action")
               public class Action implements Serializable {



              In my action I'm calling the Action entity :



              @Name("actionJSFAction")
                @Stateless
                @Scope(SESSION) 
              public class ActionJSFAction implements ActionLocal,Serializable{
              
                @In(create = true,required=false)
                Action action;



              But on submit I'm getting this error :


              javax.el.PropertyNotFoundException: /actions.xhtml @104,55 value="#{action.name}": Target Unreachable, identifier 'action' resolved to null
                      at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
                      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:81)
                      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
                      at javax.faces.component.UIInput.validate(UIInput.java:860)
                      at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
                      at javax.faces.component.UIInput.processValidators(UIInput.java:666)
                      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
                      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
                      at javax.faces.component.UIForm.processValidators(UIForm.java:229)
                      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
                      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
                      at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
                      at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
                      at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
                      at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
                      at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
                      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
                      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                      at java.lang.Thread.run(Thread.java:595)
              11:52:15,285 WARN  [lifecycle] executePhase(PROCESS_VALIDATIONS 3,com.sun.faces.context.FacesContextImpl@7f1f06) threw exception
              javax.faces.FacesException: /actions.xhtml @104,55 value="#{action.name}": Target Unreachable, identifier 'action' resolved to null
                      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:108)
                      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                      at java.lang.Thread.run(Thread.java:595)





              Do you have any ideas what's happening?


              Thanks a lot guys.
              Gabi

              • 4. Re: Seam: @In attribute requires non-null value
                gabir gabirad Newbie

                Guys,


                   I'm posting here cause if I remove the

                required=false 

                obviously  I'm getting the same


                javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: actionJSFAction.action
                        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                        at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                        at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                        at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                        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:110)
                        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)
                        at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                        at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
                        at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
                        at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
                        at $Proxy284.getActions(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:21)
                        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                        at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                        at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                        at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                        at org.javassist.tmp.java.lang.Object_$$_javassist_1.getActions(Object_$$_javassist_1.java)
                        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:21)
                        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                        at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
                        at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1926)
                        at org.jboss.seam.Component.getInstance(Component.java:1863)
                        at org.jboss.seam.Component.getInstance(Component.java:1840)
                        at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                        at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                        at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
                        at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
                        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
                        at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                        at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                        at javax.faces.component.UIData.getValue(UIData.java:582)
                        at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1459)
                        at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:70)
                        at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:64)
                        at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:592)
                        at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:994)
                        at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:107)
                        at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:92)
                        at org.richfaces.renderkit.AbstractRowsRenderer.encodeChildren(AbstractRowsRenderer.java:139)
                        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                        at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                        at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
                        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                        at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
                        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
                        at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                        at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                        at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                        at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                        at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                        at org.apache
                13:37:21,594 ERROR [STDERR] .catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                        at java.lang.Thread.run(Thread.java:595)
                Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: actionJSFAction.action
                        at org.jboss.seam.Component.getValueToInject(Component.java:2168)
                        at org.jboss.seam.Component.injectAttributes(Component.java:1598)
                        at org.jboss.seam.Component.inject(Component.java:1416)
                        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:56)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
                        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                        at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
                        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.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)
                



                Please do not ignore my post.

                • 5. Re: Seam: @In attribute requires non-null value
                  Kenneth Christensen Novice

                  Why are you using a session scoped stateless session bean?

                  • 6. Re: Seam: @In attribute requires non-null value
                    gabir gabirad Newbie

                    Kenneth Christensen wrote on Feb 21, 2008 01:15 PM:



                    Why are you using a session scoped stateless session bean?



                    Thanks for reply.


                    By mistake.But I think that wasn't the error cause.


                    I've removed the session scope :d - same error again ):

                    • 7. Re: Seam: @In attribute requires non-null value
                      Kenneth Christensen Novice

                      Yes, I know it didn't solve your problem.




                      • 8. Re: Seam: @In attribute requires non-null value
                        Kenneth Christensen Novice

                        Are you sure your ear file contains all files?
                        And what about application.xml - have you included a <module> for the jar file?

                        • 9. Re: Seam: @In attribute requires non-null value
                          gabir gabirad Newbie

                          My ear contains:


                          lib
                          META-INF
                          ejb3-persistence.jar
                          jboss-annotations-ejb3.jar
                          jboss-ejb3x.jar
                          jboss-j2ee.jar
                          jboss-seam.jar
                          otherApp.jar
                          myApp.jar
                          myApp.war



                          Yes the ejb module is included in application.xml


                          Everything is annotated.


                          That's why I'm saying that I'm stuck - I did almost anything that others suggest to be the cause of the problem.


                          Thanks again for your reply Kenneth.

                          • 10. Re: Seam: @In attribute requires non-null value
                            Kenneth Christensen Novice

                            My ear file don't contains:


                            ejb3-persistence.jar
                            jboss-annotations-ejb3.jar
                            jboss-ejb3x.jar
                            jboss-j2ee.jar
                            



                            Above files are included in JBoss AS 4.2.2.GA installation.


                            Is the 'otherApp.jar' file also included in the application.xml?

                            • 11. Re: Seam: @In attribute requires non-null value
                              gabir gabirad Newbie

                              I've removed those 4 extra jars from the ear.


                              Yes the otherApp.jar in declared in application.xml.


                              I think I'm loosing my mind with this stupid bug.


                              I'm sure that's something minor that I can't see for the moment.


                              Thanks anyway for your help.


                              I'm guessing the fact that I'm using entity's from another app might be the cause....but the other jar is in the ear...the entity's are
                              annotated...


                              The xhtml looks like this (I've deleted the inutile stuff )



                              <center><h:selectOneRadio value="#{selectedAction}">               
                              <f:converter converterId="actionConverter" />
                                   <a4j:support id="selectMTa4j" event="onclick" action="#{actionJSFAction.selectAction}"
                                        reRender="actionDefPanel">
                              <f:param name="selA" value="#{act.id}" />
                              </a4j:support>
                              <f:selectItem itemValue="#{act}" />
                              </h:selectOneRadio></center>



                              and the inputs :



                              <f:facet name="header">Add / Edit Actions</f:facet>
                                   <div class="dialog"><h:panelGrid columns="2"
                                   rowClasses="prop" columnClasses="name,description">
                              
                              <h:outputLabel for="name">Name</h:outputLabel>
                              <h:inputText id="name" value="#{action.name}" />
                              <h:outputLabel for="description">Description</h:outputLabel>
                              <h:inputText id="description" value="#{action.description}" />
                                   </h:panelGrid></div>



                              Trouble appear when I'm selecting one action (submitting).

                              • 12. Re: Seam: @In attribute requires non-null value
                                Daniel Hinojosa Master

                                make it 

                                required=true

                                , that way the component gets created, because obviously you are using it in your ActionJSFAction. 


                                BTW, consider changing your names to something more with semantic meaning.  Action and ActionJSFAction names should be terms for obscene flogging.

                                • 13. Re: Seam: @In attribute requires non-null value
                                  Srinivasan N. Raguraman Newbie

                                  Is the components are registered as entity and as well as seam components at the start up time? you could check that from the logs.


                                  The jar containing entity that also acts as seam component, should have seam.properties file


                                  That wise you could ensure that you components are registered.

                                  • 14. Re: Seam: @In attribute requires non-null value
                                    gabir gabirad Newbie

                                    Thanks Srinivasan!


                                    That was my problem!!!!!I spent 2 days , checking everything but the build.xml


                                    The seam.properties was there in resources dir but I simply forgot to


                                    <fileset dir="${resources.dir}">
                                         <include name="**/seam.properties" />
                                    </fileset>



                                    when building the otherApp.jar.


                                    Thanks guys for your help!

                                    1 2 Previous Next