2 Replies Latest reply on Nov 12, 2012 2:18 PM by gboro54

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

    gboro54 Novice

      Hi. We are deploying an EAR with a web app onto JBoss 7.1.1 using JSF 2 and Primefaces. We are getting the following exception:

       

      {code}

      1. Servlet.service() for servlet FacesServlet 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]

      at com.sun.faces.context.ExternalContextImpl.<init>(ExternalContextImpl.java:137) [jsf-impl-2.1.7-jbossorg-2.jar:]

      at com.sun.faces.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:73) [jsf-impl-2.1.7-jbossorg-2.jar:]

      at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]

      at org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextFactory.getFacesContext(CodiFacesContextFactory.java:60) [myfaces-extcdi-jsf20-module-impl-1.0.5.jar:1.0.5]

      at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121) [jsf-impl-2.1.7-jbossorg-2.jar:]

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:583) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

      at com.web.filter.UserFilter.doFilter(UserFilter.java:49) [classes:]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)

      at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]

      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:925) [jbossweb-7.0.13.Final.jar:]

      at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]

       

      {code}

       

      The only information I have found is releated to the faces-config.xml (which looks correct to me).

       

       

      {code:xml}

      <?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">

       

       

        <application>

       

       

          <message-bundle>com.web.Messages</message-bundle>

          <resource-bundle>

            <base-name>com.web.Messages</base-name>

            <var>msgs</var>

          </resource-bundle>

        </application>

       

      </faces-config>

       

      {code}

       

      Here is a copy of my script for starting jboss as well(perhaps I have tunes something incorrectly)

       

       

      {code}

      #!/bin/sh

      BIND_ADDR=XXX.XX.XX.XXX

      #Java Options

      JAVA_OPTS="-server -Djava.awt.headless=true -Xms2048m -Xmx2048m  -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=512m -XX:MaxPermSize=512m  -XX:SurvivorRatio=14 -XX:MaxTenuringThreshold=15 -Xss160k -XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Dsun.lang.ClassLoader.allowArraySyntax=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djboss.server.log.dir=/data/logs/node1"

      JAVA_OPTS="$JAVA_OPTS -Dorg.apache.el.parser.COERCE_TO_ZERO=false"

       

       

       

      export JAVA_OPTS=$JAVA_OPTS

      nohup $JBOSS_HOME/bin/standalone.sh  -b=$BIND_ADDR -bmanagement=$BIND_ADDR -bunsecure=$BIND_ADDR -c=standalone-full-ha_node1.xml -Dfbms.appid=QA1

       

      {code}