6 Replies Latest reply on Apr 22, 2010 12:17 PM by Marcos Antonio

    JBoss 6 M2: Servlet.service() for servlet Faces Servlet threw exception: java.lang.StackOverflowError

    Marcos Antonio Novice

      Hello, everybody!

       

      I'm getting the following error when I access my web application in JBoss 6.0.0 M2:

       

      2010-04-19 13:22:19,406 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/solicitacoes].[Faces Servlet]] (http-127.0.0.1-8080-1) Servlet.service() for servlet Faces Servlet threw exception: java.lang.StackOverflowError
      at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:72)
      at org.apache.tomcat.util.buf.MessageBytes$MessageBytesFactory.newInstance(MessageBytes.java:677)
      at org.apache.tomcat.util.buf.MessageBytes.newInstance(MessageBytes.java:78)
      at org.apache.tomcat.util.http.MimeHeaders$MimeHeaderField.<init>(MimeHeaders.java:190)
      at org.apache.tomcat.util.http.MimeHeaders.createHeader(MimeHeaders.java:342)
      at org.apache.tomcat.util.http.MimeHeaders.addValue(MimeHeaders.java:352)
      at org.apache.coyote.Response.addHeader(Response.java:347)
      at org.apache.catalina.connector.Response.addHeader(Response.java:1085)
      at org.apache.catalina.connector.ResponseFacade.addHeader(ResponseFacade.java:491)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202)
      ...

       

      This is my web.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app version="3.0" 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-app_3_0.xsd">

      <display-name>Solicitações</display-name>

       

      <!-- ========== 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>*.xhtml</url-pattern>

      </servlet-mapping>

      <context-param>

      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

      <param-value>client</param-value>

      </context-param>

      <context-param>

      <param-name>javax.faces.PROJECT_STAGE</param-name>

      <param-value>Development</param-value>

      </context-param>

       

      <!-- ========== Página inicial ========== -->

      <welcome-file-list>

      <welcome-file>novasolicitacao.xhtml</welcome-file>

      </welcome-file-list>

      </web-app>

       

      And the web pages that I use:

       

      novasolicitacao.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:f="http://java.sun.com/jsf/core"

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

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

      <body>

      <ui:composition template="/modelos/layout.xhtml">

      <ui:define name="titulo">Nova Solicitação</ui:define>

       

      <ui:define name="conteudo">

      Conteúdo

      <!-- <h:outputText value="#{pagina.abc}" /> -->

      </ui:define>

      </ui:composition>

      </body>

      </html>

       

      layout.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:f="http://java.sun.com/jsf/core"

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

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

      <h:head>

      <title><ui:insert name="titulo" /></title>

      </h:head>

      <h:body>

      <h:form id="form">

      <ui:insert name="conteudo" />

      <h:inputHidden id="componenteFocalizado" />

      </h:form>

      </h:body>

      </html>

       

      What could be causing this error?

       

      Thank you in advance.

       

      Marcos