1 Reply Latest reply on Aug 27, 2012 6:32 AM by schos3

    Problem faces-config with header max 128

    schos3

      Hi community i got the following problem

      when i try to run my jsf-unit test the following exception occurs al the time:

       

      Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: Header count exceeded allowed maximum: 128

       

      what i'm doing wrong here

       

      my faces-config looks like:

       

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

       

       

      <faces-config version="2.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-facesconfig_2_0.xsd">

      </faces-config>

      Does anyone have an idea

       

      Thanks

      Sven

       

      Here some more stack trace:

       

      [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/simplemessageTest].[Faces Servlet]] (http-localhost-127.0.0.1-8080-3) Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: Header count exceeded allowed maximum: 128

                at org.apache.tomcat.util.http.MimeHeaders.createHeader(MimeHeaders.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.http.MimeHeaders.addValue(MimeHeaders.java:347) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.Response.addHeader(Response.java:351) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.Response.addHeader(Response.java:1110) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.ResponseFacade.addHeader(ResponseFacade.java:502) [jbossweb-7.0.13.Final.jar:]

                at javax.servlet.http.HttpServletResponseWrapper.addHeader(HttpServletResponseWrapper.java:202) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

        • 1. Re: Problem faces-config with header max 128
          schos3

          Found the problem by myself:

           

          return ShrinkWrap.create(WebArchive.class, "componentScannerTest.war").setWebXML(new File("src/test/resources/web.xml"))

                  .addAsWebInfResource(new File("src/test/resources/faces-config.xml"), "faces-config.xml")

                  .addAsWebResource(new File("src/test/resources/testpages", "jsftablescannertest.xhtml"))

                  .addAsLibraries(dependencyResolver.resolveAsFiles());

            }

           

          the faces-config must be added as Web-Inf resource