0 Replies Latest reply on Nov 12, 2008 6:21 PM by Thai Dang Vu

    Exception running the numberguess example in jboss

    Thai Dang Vu Apprentice

      I'm using java 6, seam 2.1.0.GA, jboss 4.2.3.GA. I deployed the numberguess example with ant deploy and started jboss. This is the exception when I accessed the numberguess application:


      org.apache.jasper.JasperException: An exception occurred processing JSP page /numberGuess.jspx at line 48
      
      45:         </h:inputText>
      46:         <h:selectOneMenu id="selectGuessMenu" value="#{numberGuess.currentGuess}" required="true"
      47:                        rendered="#{(numberGuess.biggest-numberGuess.smallest) le 20 and (numberGuess.biggest-numberGuess.smallest) gt 4}">
      48:           <s:selectItems id="PossibilitiesMenuItems" value="#{numberGuess.possibilities}" var="i" label="#{i}"/>
      49:         </h:selectOneMenu>
      50:         <h:selectOneRadio id="selectGuessRadio" value="#{numberGuess.currentGuess}" required="true"
      51:                        rendered="#{(numberGuess.biggest-numberGuess.smallest) le 4}">
      
      
      Stacktrace:
           org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
           com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
           com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
           org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:87)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
           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:38)
           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)
      
      root cause
      
      java.lang.ClassCastException: javax.faces.component.UIViewRoot cannot be cast to org.jboss.seam.ui.component.html.HtmlSelectItems
           org.jboss.seam.ui.taglib.SelectItemsTag.setProperties(SelectItemsTag.java:186)
           javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:614)
           javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1142)
           org.apache.jsp.numberGuess_jspx._jspx_meth_s_005fselectItems_005f0(numberGuess_jspx.java:152)
           org.apache.jsp.numberGuess_jspx._jspService(numberGuess_jspx.java:102)
           org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
           com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
           com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
           org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:87)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
           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:38)
           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's my problem?