5 Replies Latest reply: Apr 3, 2012 7:19 PM by Naveen Sisupalan RSS

    Basic JSF2 Setup in JBoss 7 : Infinite Loop when loading page

    cobold Newbie

      I'm new to JBoss but have worked with Tomcat and JSF2 in the past. When trying to start a basic .xhtml page in JBoss AS 7.0, I'm running into the following problem:

      javax.servlet.ServletException

      javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)

       

       

      root cause


      java.lang.StackOverflowError
           java.net.URLStreamHandler.sameFile(URLStreamHandler.java:378)
           java.net.URLStreamHandler.equals(URLStreamHandler.java:316)
           java.net.URL.equals(URL.java:842)
           java.util.concurrent.ConcurrentHashMap$Segment.get(ConcurrentHashMap.java:338)
           java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:769)
           com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:95)
           com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:119)
           com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:62)
           com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:248)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:366)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
           com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
           com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
           com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
           com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
           com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
           com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
           com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
              com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
              com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
           etc...

      After that, the stack repeats forever. I have no idea what causes this problem.

       

      web.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
        <display-name>PlayingDatabase</display-name>
        <welcome-file-list>
          <welcome-file>index.html</welcome-file>
          <welcome-file>index.htm</welcome-file>
          <welcome-file>index.jsp</welcome-file>
          <welcome-file>default.html</welcome-file>
          <welcome-file>default.htm</welcome-file>
          <welcome-file>default.jsp</welcome-file>
        </welcome-file-list>
        <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>*.xhtml</url-pattern>
        </servlet-mapping>
      </web-app>
      

       

      faces-config.xhtml:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <faces-config
          xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
          version="2.0">
      
      </faces-config>
      
      
      

       

       

      faces/testpage.xhtml:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

       

      <html xmlns="http://www.w3.org/1999/xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core">

       

      <ui:composition template="">

          <ui:define name="header">

              Add your header here or delete to use the default

          </ui:define>

          <ui:define name="content">

       

              <h:inputText value="Tesite"/>

          </ui:define>

          <ui:define name="footer">

              Add your footer here or delete to use the default

          </ui:define>

      </ui:composition>

      </html>

       

      cobold: Attached file