5 Replies Latest reply on Nov 1, 2007 5:53 PM by Jiyuan Wang

    no page context active exception when use seam pdf

    Jiyuan Wang Newbie

      Hi I am new to Seam and met a problem with SEAM PDF. I try to generate a pdf report using seam pdf. I followed the code example of Yuans book and seam online doc. everything works fine (the pdf was generated correctly). However, just there are some errors in the server log. I cannot figure out why there are some errors. Would somebody please help me out on this? Thanks a lot!

      ____________________________________________________

      10:28:09,374 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No page context active
      at org.jboss.seam.core.FacesPage.instance(FacesPage.java:88)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:232)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
      :664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      10:28:09,374 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No page context active
      at org.jboss.seam.core.FacesPage.instance(FacesPage.java:88)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:232)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
      :664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      10:28:09,421 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active event context
      at org.jboss.seam.core.Manager.instance(Manager.java:267)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:246)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
      :664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      10:28:09,421 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: No active event context
      at org.jboss.seam.core.Manager.instance(Manager.java:267)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:246)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:115)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
      :664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)

        • 1. Re: no page context active exception when use seam pdf
          Jiyuan Wang Newbie

          forgot to mention the version of jboss and seam I use.
          JBoss: 4.0.4 GA
          Seam: 1.2.1 GA
          Thanks!

          • 2. Re: no page context active exception when use seam pdf
            Jiyuan Wang Newbie

            components.xml
            (replace quote with \ and [] replace less than/great than, since they cause 404 error)
            _______________________________________________
            [?xml version=\1.0\ encoding=\UTF-8\?]
            [components xmlns=\http://jboss.com/products/seam/components\
            xmlns:core=\http://jboss.com/products/seam/core\
            xmlns:security=\http://jboss.com/products/seam/security\
            xmlns:drools=\http://jboss.com/products/seam/drools\
            xmlns:web=\http://jboss.com/products/seam/web\
            xmlns:pdf=\http://jboss.com/products/seam/pdf\
            xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\
            xsi:schemaLocation=
            \http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
            http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd
            http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
            http://jboss.com/products/seam/web http://jboss.com/products/seam/web-1.2.xsd
            http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.2.xsd\]


            [core:init
            debug=\true\
            myFacesLifecycleBug=\true\
            jndi-pattern=\acctrecv/#{ejbName}/local\ /]

            [core:manager conversation-timeout=\120000\
            concurrent-request-timeout=\500\
            conversation-id-parameter=\cid\
            conversation-is-long-running-parameter=\clr\/]

            [core:managed-persistence-context name=\entityManager\ auto-create=\true\
            persistence-unit-jndi-name=\java:/seamspaceEntityManagerFactory\/]


            [web:multipart-filter create-temp-files=\true\
            max-request-size=\1000000\
            url-pattern=\*.seam\/]
            [!-- [pdf:documentStore useExtensions=\true\ /] --]
            [H/components]

            • 3. Re: no page context active exception when use seam pdf
              Jiyuan Wang Newbie

              web.xml
              (replace quote with \ and [] replace less than/great than, since they cause 404 error)
              _________________________________________________
              [?xml version=\1.0\ encoding=\UTF-8\?]
              [web-app version=\2.4\
              xmlns=\http://java.sun.com/xml/ns/j2ee\
              xmlns:xsi=\http://www.w3.org/2001/XMLSchema-instance\
              xsi:schemaLocation=\http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\]

              [!-- This is the original that was working with richFaces --]

              [!-- Ajax4jsf (must come first!) --]

              [context-param]
              [param-name]org.ajax4jsf.SKIN[/param-name]
              [param-value]blueSky[/param-value]
              [/context-param]

              [filter]
              [display-name]Ajax4jsf Filter[/display-name]
              [filter-name]ajax4jsf[/filter-name]
              [filter-class]org.ajax4jsf.Filter[/filter-class]
              [/filter]

              [filter-mapping]
              [filter-name]ajax4jsf[/filter-name]
              [url-pattern]*.faces[/url-pattern]
              [/filter-mapping]


              [!-- Seam --]
              [listener]
              [listener-class]org.jboss.seam.servlet.SeamListener[/listener-class]
              [/listener]

              [!-- Propagate conversations across redirects --]
              [filter]
              [filter-name]Seam Redirect Filter[/filter-name]
              [filter-class]org.jboss.seam.servlet.SeamRedirectFilter[/filter-class]
              [/filter]

              [filter-mapping]
              [filter-name]Seam Redirect Filter[/filter-name]
              [url-pattern]*.faces[/url-pattern]
              [/filter-mapping]


              [filter]
              [filter-name]Seam Exception Filter[/filter-name]
              [filter-class]org.jboss.seam.servlet.SeamExceptionFilter[/filter-class]
              [/filter]

              [filter-mapping]
              [filter-name]Seam Exception Filter[/filter-name]
              [url-pattern]*.faces[/url-pattern]
              [/filter-mapping]

              [filter]
              [filter-name]Seam Multipart Filter[/filter-name]
              [filter-class]org.jboss.seam.web.MultipartFilter[/filter-class]
              [init-param]
              [param-name]createTempFiles[/param-name]
              [param-value]true[/param-value]
              [/init-param]
              [/filter]

              [filter-mapping]
              [filter-name]Seam Multipart Filter[/filter-name]
              [url-pattern]*.seam[/url-pattern]
              [/filter-mapping]

              [!--
              [filter]
              [filter-name]Seam Servlet Filter[/filter-name]
              [filter-class]org.jboss.seam.servlet.SeamServletFilter[/filter-class]
              [/filter]

              [filter-mapping]
              [filter-name]Seam Servlet Filter[/filter-name]
              [url-pattern]*.pdf[/url-pattern]
              [/filter-mapping]

              [servlet]
              [servlet-name]Document Store Servlet[/servlet-name]
              [servlet-class]org.jboss.seam.pdf.DocumentStoreServlet[/servlet-class]
              [/servlet]

              [servlet-mapping]
              [servlet-name]Document Store Servlet[/servlet-name]
              [url-pattern]*.pdf[/url-pattern]
              [/servlet-mapping]
              --]

              [session-config]
              [session-timeout]
              120
              [/session-timeout]
              [/session-config]

              [welcome-file-list]
              [welcome-file]
              index.html
              [/welcome-file]
              [/welcome-file-list]

              [!-- JSF --]

              [context-param]
              [param-name]javax.faces.STATE_SAVING_METHOD[/param-name]
              [param-value]client[/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]facelets.DEVELOPMENT[/param-name]
              [param-value]true[/param-value]
              [/context-param]

              [!--
              [context-param]
              [param-name]com.sun.faces.validateXml[/param-name]
              [param-value]true[/param-value]
              [/context-param]

              [context-param]
              [param-name]com.sun.faces.verifyObjects[/param-name]
              [param-value]true[/param-value]
              [/context-param]

              [context-param]
              [param-name]org.ajax4jsf.SKIN[/param-name]
              [param-value]DEFAULT[/param-value]
              [/context-param]
              --]

              [filter]
              [filter-name]MyFacesExtensionsFilter[/filter-name]
              [filter-class]org.apache.myfaces.webapp.filter.ExtensionsFilter[/filter-class]
              [init-param]
              [param-name]maxFileSize[/param-name]
              [param-value]50m[/param-value]
              [description]Set the size limit for uploaded files.
              Format: 10 - 10 bytes
              10k - 10 KB
              10m - 10 MB
              1g - 1 GB
              [/description]
              [/init-param]
              [/filter]

              [!-- extension mapping for adding [script/], [link/], and other resource tags to JSF-pages --]
              [filter-mapping]
              [filter-name]MyFacesExtensionsFilter[/filter-name]
              [!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry --]
              [servlet-name]Faces Servlet[/servlet-name]
              [/filter-mapping]

              [!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) --]
              [filter-mapping]
              [filter-name]MyFacesExtensionsFilter[/filter-name]
              [url-pattern]/faces/myFacesExtensionResource/*[/url-pattern]
              [/filter-mapping]


              [!-- Global JNDI name pattern for JBoss EJB3 (change for other servers) --]
              [context-param]
              [param-name]org.jboss.seam.core.init.jndiPattern[/param-name]
              [param-value]acctrecv/#{ejbName}/local[/param-value]
              [/context-param]

              [!-- Add more libraries by providing a semi-colon delimited list --]
              [context-param]
              [param-name]facelets.LIBRARIES[/param-name]
              [param-value]/WEB-INF/tomahawk.taglib.xml[/param-value]
              [/context-param]


              [context-param]
              [param-name]facelets.SKIP_COMMENTS[/param-name]
              [param-value]true[/param-value]
              [/context-param]

              [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]SourceCodeServlet[/servlet-name]
              [servlet-class]org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet[/servlet-class]
              [/servlet]

              [!-- Faces Servlet Mapping --]
              [servlet-mapping]
              [servlet-name]Faces Servlet[/servlet-name]
              [url-pattern]*.faces[/url-pattern]
              [/servlet-mapping]

              [servlet-mapping]
              [servlet-name]Faces Servlet[/servlet-name]
              [url-pattern]*.seam[/url-pattern]
              [/servlet-mapping]

              [!-- MyFaces --]
              [listener]
              [listener-class]org.apache.myfaces.webapp.StartupServletContextListener[/listener-class]
              [/listener]

              [/web-app]

              • 4. Re: no page context active exception when use seam pdf
                Jiyuan Wang Newbie

                After debugging, find out the problem located in org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(PhaseEvent event).

                there is a fix for a bug in MyFaces prior to 1.1.3 (I don't know what exactly is the bug though).

                ------------------------------------------------------------
                //workaround for a bug in MyFaces prior to 1.1.3
                if ( Init.instance().isMyFacesLifecycleBug() )
                {
                Lifecycle.endRequest( facesContext.getExternalContext() );
                }
                ------------------------------------------------------------

                And in Lifecycle.endRequest(), it will clear all the Threadlocals.
                ------------------------------------------------------------
                Contexts.eventContext.set(null);
                Contexts.pageContext.set(null);
                Contexts.sessionContext.set(null);
                Contexts.conversationContext.set(null);
                Contexts.businessProcessContext.set(null);
                Contexts.applicationContext.set(null);
                ------------------------------------------------------------

                After clearing all the contexts, AbstractSeamPhaseListener tries to get an instance of the FacesPage and store the conversation and page flow.
                ------------------------------------------------------------
                FacesPage.instance().storeConversation();
                FacesPage.instance().storePageflow();
                ------------------------------------------------------------

                And here comes the exceptions, which are swallowed by SEAM though (but shows in the server/app log). In the method of getting an instance of FacesPage, it will check if the page context is active or not. if not, then throws an exception.
                ------------------------------------------------------------
                public static FacesPage instance()
                {
                if ( !Contexts.isPageContextActive() )
                {
                throw new IllegalStateException("No page context active");
                }
                return (FacesPage) Component.getInstance(FacesPage.class, ScopeType.PAGE);
                }
                ------------------------------------------------------------

                I guess I will try to upgrade MyFaces lib to a newer version to see if I can remove this annoying error message in the log.

                or anybody knows how to solve this problem and let me know, I'll really appreciate it.

                • 5. Re: no page context active exception when use seam pdf
                  Jiyuan Wang Newbie

                  Again, this is Seam 1.2.1 GA. There is no AbstractSeamPhaseListener in seam 2.0.0CR3