2 Replies Latest reply on Oct 7, 2010 2:40 AM by Marcel Bussien

    PDF generation in seam

    Marcel Bussien Newbie
      Hi, I try to display the chapters.xhtml page from the seam-excemple in pdf errors:

              at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:289)
              at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:288)
              ... 61 more
      12:40:51,655 SEVERE lifecycle JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /chapters.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[sourcsun.faces.lifecycle.LifecycleImpl@7aa38:40:51,658 ERRoblem encountered during View.servePagax.faces.FacesException: Problem in renderResponse: java.lang.NullPointerExcepti     at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:29     at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:15     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:11     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:10     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:13     at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:1     at com.icesoft.faces.context.View$2$1.respond(View.java:4     at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:20     at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java
      com.icesoft.faces.context.View$2.serve(View.java:7
      put all the needed jar's into java build path
      C:\jboss-5.1.0.GA\lib
      C:\jboss-5.1.0.GA\server\default\lib

      What did I oversee? :-(
        • 1. Re: PDF generation in seam
          judy guglielmin Novice

          Since seam-pdf (and seam-excel) make use of ExternalContext class, and the PersistentFacesServlet of ICEfaces uses BridgeExternalContext, you either have to use jsf-delegation (did you do so already?) or you have to use a wrapper class within Seam (meaning recompiling all the jars--so jsf-delegation is the easiest).
          See jira ICE-2114 for an example and more info or search on the ICEfaces forum.

          • 2. Re: PDF generation in seam
            Marcel Bussien Newbie
            thanxs judy

            I did as you told me components.xhtml:
            <?xml version="1.0" encoding="UTF-8"?>
            <components xmlns="http://jboss.com/products/seam/components"
                           xmlns:pdf="http://jboss.com/products/seam/pdf"
                        xmlns:core="http://jboss.com/products/seam/core"
                        xmlns:framework="http://jboss.com/products/seam/framework"
                        xmlns:persistence="http://jboss.com/products/seam/persistence"
                        xmlns:drools="http://jboss.com/products/seam/drools"
                        xmlns:bpm="http://jboss.com/products/seam/bpm"
                        xmlns:security="http://jboss.com/products/seam/security"
                        xmlns:mail="http://jboss.com/products/seam/mail"
                        xmlns:web="http://jboss.com/products/seam/web"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation=
                            "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
                             http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
                             http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                             http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
                             http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                             http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                             http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                             http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">

            <component name="org.jboss.seam.document.documentStore">
                    <property name="useExtensions">true</property>
                    <property name="errorPage">/pdfMissing.seam</property>
            </component>
            <pdf:key-store-config key-store="pdf.keystore"
                                      key-store-password="storepass"
                                      key-password="keypass"
                                      key-alias="pdfKey" />

               <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/>

               <component name="renderManager" scope="application" class="com.icesoft.faces.async.render.RenderManager" auto-create="true"/>

               <core:manager concurrent-request-timeout="500"
                             conversation-timeout="120000"
                             conversation-id-parameter="cid"
                             parent-conversation-id-parameter="pid"/>

               <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
               <web:hot-deploy-filter url-pattern="*.seam"/>

               <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                  persistence-unit-jndi-name="@puJndiName@"/>

               <drools:rule-base name="securityRules">
                  <drools:rule-files>
                     <value>/security.drl</value>
                  </drools:rule-files>
               </drools:rule-base>

               <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

               <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

               <event type="org.jboss.seam.security.notLoggedIn">
                  <action execute="#{redirect.captureCurrentView}"/>
               </event>
               <event type="org.jboss.seam.security.loginSuccessful">
                  <action execute="#{redirect.returnToCapturedView}"/>
               </event>

               <mail:mail-session host="localhost" port="25"/>

               <!-- For use with jBPM pageflow or process management -->
               <!--
               <bpm:jbpm>
                  <bpm:process-definitions></bpm:process-definitions>
                  <bpm:pageflow-definitions></bpm:pageflow-definitions>
               </bpm:jbpm>
               -->

            </components>


            web.xml:
            <?xml version="1.0" encoding="UTF-8"?>
            <web-app version="2.5"
                     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_2_5.xsd">
               
                <!-- Seam (using Icefaces) generated project-->

                <!-- listeners required for this application -->
                <listener>
                    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                </listener>
               
               <listener>
                  <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
               </listener>
                
            <!-- filters -->
                <servlet>
                    <servlet-name>Seam Resource Servlet</servlet-name>
                    <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
                </servlet>
               
                <servlet-mapping>
                    <servlet-name>Seam Resource Servlet</servlet-name>
                    <url-pattern>/seam/resource/*</url-pattern>
                </servlet-mapping>
               
                <filter>
                    <filter-name>Seam Filter</filter-name>
                    <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
                </filter>

                <filter-mapping>
                    <filter-name>Seam Filter</filter-name>
                    <url-pattern>/*</url-pattern>
                </filter-mapping>

                <!-- JSF -->

               
               <!-- Facelets development mode (disable in production) -->
                <context-param>
                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                  <param-value>server</param-value>
                </context-param>

                <context-param>
                    <param-name>facelets.DEVELOPMENT</param-name>
                    <param-value>true</param-value>
                </context-param>

                <context-param>
                    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                    <param-value>.xhtml</param-value>
                </context-param>

                <context-param>
                    <param-name>com.icesoft.faces.actionURLSuffix</param-name>
                    <param-value>.seam</param-value>
                </context-param>

                <context-param>
                    <param-name>com.icesoft.faces.synchronousUpdate</param-name>
                    <param-value>true</param-value>
                </context-param>

                <context-param>
                    <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
                     <param-value>true</param-value>
                </context-param>

                <context-param>
                    <param-name>com.icesoft.faces.standardRequestScope</param-name>
                    <param-value>true</param-value>
                </context-param>
                 <context-param>
                      <param-name>com.icesoft.faces.delegateNonIface</param-name>
                       <param-value>true</param-value>
                  </context-param>

            <!-- servlets -->
                <servlet>
                    <servlet-name>Faces Servlet</servlet-name>
                    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                    <load-on-startup>1</load-on-startup>
                </servlet>
               
              <servlet>
                    <servlet-name>Persistent Faces Servlet</servlet-name>
                    <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
                    <load-on-startup> 1 </load-on-startup>
                </servlet>
                <servlet>
                    <servlet-name>Blocking Servlet</servlet-name>
                    <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
                    <load-on-startup> 1 </load-on-startup>
                </servlet> 
                  <servlet>
                    <servlet-name>Document Store Servlet</servlet-name>
                    <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
                </servlet>
             
            <!-- servlet mappings -->
                <servlet-mapping>
                    <servlet-name>Persistent Faces Servlet</servlet-name>
                    <url-pattern>*.seam</url-pattern>
                </servlet-mapping>
                 <servlet-mapping>
                    <servlet-name>Faces Servlet</servlet-name>
                    <url-pattern>*.jsf</url-pattern>
                </servlet-mapping>
                <servlet-mapping>
                    <servlet-name>Document Store Servlet</servlet-name>
                    <url-pattern>*.pdf</url-pattern>
                </servlet-mapping>
                 <servlet-mapping>
                    <servlet-name>Persistent Faces Servlet</servlet-name>
                    <url-pattern>/xmlhttp/*</url-pattern>
                </servlet-mapping>
               
                <!-- Blocking Servlet Mapping -->
                <servlet-mapping>
                    <servlet-name>Blocking Servlet</servlet-name>
                    <url-pattern>/block/*</url-pattern>
                </servlet-mapping>

                <session-config>
                    <session-timeout>10</session-timeout>
                </session-config>
               
               <persistence-unit-ref>
                  <persistence-unit-ref-name>contract/pu</persistence-unit-ref-name>
                  <persistence-unit-name>../contract.jar#contract</persistence-unit-name>
                  <!-- The relative reference doesn't work on GlassFish. Instead, set the <persistence-unit-name> to "contract",
                       package persistence.xml in the WAR, and add a <jar-file> element in persistence.xml with value "../../contract.jar".
                  <persistence-unit-name>contract</persistence-unit-name>
                  -->
               </persistence-unit-ref>   

            </web-app>



            but still overseen something ? :-):

            08:34:39,280 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:3s:944ms
            08:35:50,680 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
            08:35:50,692 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
            08:36:14,529 ERROR [D2DFaceletViewHandler] Problem in renderResponse: java.lang.NullPointerException
            java.lang.RuntimeException: java.lang.NullPointerException
                 at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:292)
                 at org.jboss.seam.pdf.ui.UIDocument.encodeBegin(UIDocument.java:267)
                 at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:514)
                 at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
                 at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
                 at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
                 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                 at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
                 at com.icesoft.faces.context.View$2$1.respond(View.java:48)
                 at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
                 at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
                 at com.icesoft.faces.context.View$2.serve(View.java:76)
                 at com.icesoft.faces.context.View.servePage(View.java:139)
                 at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
                 at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
                 at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
                 at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
                 at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
                 at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
                 at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
                 at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
                 at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
                 at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
                 at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                 at java.lang.Thread.run(Unknown Source)
            Caused by: java.lang.NullPointerException
                 at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:315)
                 at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:186)
                 at com.icesoft.faces.context.DOMResponseWriter.cloneWithWriter(DOMResponseWriter.java:251)
                 at org.jboss.seam.pdf.ui.ITextComponent.extractText(ITextComponent.java:265)
                 at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:241)
                 at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:289)
                 at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:256)
                 at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:289)
                 at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:288)
                 ... 60 more
            08:36:14,546 SEVERE [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /chapters.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@92c3e9c]
            08:36:14,548 ERROR [View] Problem encountered during View.servePage
            javax.faces.FacesException: Problem in renderResponse: java.lang.NullPointerException
                 at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:296)
                 at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
                 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                 at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
                 at com.icesoft.faces.context.View$2$1.respond(View.java:48)
                 at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
                 at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
                 at com.icesoft.faces.context.View$2.serve(View.java:76)
                 at com.icesoft.faces.context.View.servePage(View.java:139)
                 at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
                 at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
                 at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
                 at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
                 at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
                 at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
                 at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
                 at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
                 at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
                 at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
                 at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                 at java.lang.Thread.run(Unknown Source)
            Caused by: java.lang.RuntimeException: java.lang.NullPointerException
                 at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:292)
                 at org.jboss.seam.pdf.ui.UIDocument.encodeBegin(UIDocument.java:267)
                 at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:514)
                 at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
                 at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
                 ... 56 more
            Caused by: java.lang.NullPointerException
                 at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:315)
                 at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:186)
                 at com.icesoft.faces.context.DOMResponseWriter.cloneWithWriter(DOMResponseWriter.java:251)
                 at org.jboss.seam.pdf.ui.ITextComponent.extractText(ITextComponent.java:265)
                 at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:241)
                 at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:289)
                 at org.jboss.seam.pdf.ui.ITextComponent.encodeChildren(ITextComponent.java:256)
                 at org.jboss.seam.pdf.ui.ITextComponent.encode(ITextComponent.java:289)
                 at org.jboss.seam.pdf.ui.UIDocument.processHeaders(UIDocument.java:288)
                 ... 60 more
            08:36:17,737 WARNING [lifecycle] JSF1053: (Listener: org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(), Phase ID: RENDER_RESPONSE 6,  View ID: /debug.xhtml) Exception thrown during phase-listener execution: java.lang.IllegalStateException: getOutputStream() has already been called for this response
            08:36:17,738 WARNING [lifecycle] org.apache.catalina.connector.Response.getWriter(Response.java:619)
            org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
            javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
            org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:51)
            com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
            com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
            com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
            com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
            com.icesoft.faces.context.View$2$1.respond(View.java:48)
            com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
            com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
            com.icesoft.faces.context.View$2.serve(View.java:76)
            com.icesoft.faces.context.View.servePage(View.java:139)
            com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
            com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
            com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:114)
            com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
            com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
            com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
            com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
            com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
            com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
            com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
            com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
            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.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
            org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
            org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
            org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
            org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
            org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
            org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
            org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
            org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
            org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
            org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            java.lang.Thread.run(Unknown Source)