4 Replies Latest reply on Jan 29, 2008 4:42 AM by Siarhei Dudzin

    @In attribute requires non-null value: register.user

    yu hui Newbie

      Hi there,

      I got the following problem on my Seam application. Looking at the error, it seems my properties are not injected by Seam. Thanks beforehand for your help.

      The application is to register new user before enabling the user to login to the system.

      When clicking "register" on the registration page, debug page appear with the following:

      Exception during request processing:
      javax.faces.FacesException: javax.el.ELException: //D:/app/eclipse/framework/PROJECT_SRC/TestWeb/WebRoot/register.xhtml @82,76 value="#{register.verify}": org.jboss.seam.RequiredException: @In attribute requires non-null value: register.user
      at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:850)
      at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
      at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
      at
      .....................................

      Caused by: javax.el.ELException: //D:/app/eclipse/framework/PROJECT_SRC/TestWeb/WebRoot/register.xhtml @82,76 value="#{register.verify}": org.jboss.seam.RequiredException: @In attribute requires non-null value: register.user
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:184)

      Looking at the error, it appear to me that there is either EL exception or injection error (no idea why though....)

      web.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4"
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <!-- Seam -->
       <listener>
       <listener-class>
       org.jboss.seam.servlet.SeamListener
       </listener-class>
       </listener>
       <listener>
       <listener-class>
       com.sun.faces.config.ConfigureListener
       </listener-class>
       </listener>
      
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>
       org.jboss.seam.servlet.SeamResourceServlet
       </servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.expressionFactory</param-name>
       <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
       </context-param>
       <!-- JSF -->
      
       <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>*.seam</url-pattern>
       </servlet-mapping>
      
       <session-config>
       <session-timeout>10</session-timeout>
       </session-config>
      
       <security-constraint>
       <display-name>Restrict raw XHTML Documents</display-name>
       <web-resource-collection>
       <web-resource-name>XHTML</web-resource-name>
       <url-pattern>*.xhtml</url-pattern>
       </web-resource-collection>
       <auth-constraint />
       </security-constraint>
      </web-app>


      Any help and idea is appreciated.