myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Robinson <andrew.rw.robin...@gmail.com>
Subject Re: Trinidad RequestContext Null
Date Sun, 17 Apr 2011 22:29:43 GMT
A4J + Trinidad is not supported. The two Ajax solutions are not tested and
probably are not compatible.

I do not see "org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler"
anywhere in your web.xml

Check this WIKI out:
http://myfaces.apache.org/trinidad/installation.html

On Sun, Apr 17, 2011 at 10:16 AM, omid p <vermindimo@gmail.com> wrote:

> Hi,
> I am using Seam 2.2, Richfaces 3.3, Trinidad 1.2.13, JBoss as 4.2 when i
> want to use
> org.apache.myfaces.trinidad.context.RequestContext.getCurrentContext i've
> got this exception :
>
> 2011-04-17 20:38:29,784 DEBUG
> [org.ajax4jsf.webapp.FilterServletResponseWrapper] Create StringWriter for
> buffer servlet output
> 2011-04-17 20:38:29,785 ERROR [STDERR] Apr 17, 2011 8:38:29 PM
> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
> createResponseWriter
> SEVERE: No RenderingContext has been created.
> 2011-04-17 20:38:29,788 DEBUG [org.ajax4jsf.renderkit.RendererBase] Start
> encoding of component _viewRoot with class
> org.ajax4jsf.component.AjaxViewRoot
> 2011-04-17 20:38:29,838 WARN
> [javax.enterprise.resource.webcontainer.jsf.lifecycle]
> phase(RENDER_RESPONSE
>
> 6,org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit@a43065
> )
> threw exception: java.lang.IllegalStateException: No RenderingContext No
> RenderingContext
>
> org.apache.myfaces.trinidad.render.CoreRenderer.encodeBegin(CoreRenderer.java:305)
>
> org.apache.myfaces.trinidadinternal.renderkit.htmlBasic.HtmlFormRenderer.encodeBegin(HtmlFormRenderer.java:56)
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
>
> org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:56)
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
>
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
>
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
> org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
>
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
>
> 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.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:510)
> org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
>
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
>
> 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.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.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
> org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
>
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
>
> 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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
> org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
>
> org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
> org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
> org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
>
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
>
> 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.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:230)
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
>
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
>
> 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:157)
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
> java.lang.Thread.run(Thread.java:619)
>
> and this is my configuration
>
> <?xml version="1.0" ?>
> <web-app 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"
>   version="2.5">
>
>    <!-- <context-param>
>        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
>        <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>    </context-param> -->
>
>    <context-param>
>        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>        <param-value>client</param-value>
>    </context-param>
>
>    <context-param>
>        <!--
>            Unfortunately, Facelets provides no hook for plugging the
>            PageResolver into the logic handling "facelets.VIEW_MAPPINGS".
> You
>            should leave "facelets.VIEW_MAPPINGS" unset and use
>            "org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS" instead.
>        -->
>
> <param-name>org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS</param-name>
>        <param-value>*.xhtml</param-value>
>    </context-param>
>
>
>    <context-param>
>
> <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
>        <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>    </context-param>
>
>    <context-param>
>
>
> <param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS</param-name>
>        <param-value>false</param-value>
>    </context-param>
>
>    <context-param>
>        <param-name>facelets.VIEW_MAPPINGS</param-name>
>        <param-value>*.xhtml</param-value>
>    </context-param>
>
>   <!-- RichFaces -->
>
>   <context-param>
>      <param-name>org.richfaces.SKIN</param-name>
>      <param-value>wine</param-value>
>   </context-param>
>
>   <!-- Suppress spurious stylesheets -->
>
>   <context-param>
>      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
>      <param-value>disable</param-value>
>   </context-param>
>
>   <context-param>
>      <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
>      <param-value>disable</param-value>
>   </context-param>
>
>   <!-- Change load strategy to DEFAULT to disable sending scripts/styles as
> packs -->
>
>   <context-param>
>      <param-name>org.richfaces.LoadStyleStrategy</param-name>
>      <param-value>ALL</param-value>
>   </context-param>
>
>   <context-param>
>      <param-name>org.richfaces.LoadScriptStrategy</param-name>
>      <param-value>ALL</param-value>
>   </context-param>
>
>   <!-- Seam -->
>
>   <listener>
>      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
>   </listener>
>
>   <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>
>
>   <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>
>
>   <!-- Facelets development mode (disable in production) -->
>
>   <context-param>
>      <param-name>facelets.DEVELOPMENT</param-name>
>      <param-value>true</param-value>
>   </context-param>
>
>   <!-- JSF -->
>
>   <context-param>
>      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>      <param-value>.xhtml</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-mapping>
>      <servlet-name>Faces Servlet</servlet-name>
>      <url-pattern>*.seam</url-pattern>
>   </servlet-mapping>
>
>   <filter-mapping>
>        <filter-name>Seam Filter</filter-name>
>        <servlet-name>Faces Servlet</servlet-name>
>    </filter-mapping>
>
>       <filter>
>        <filter-name>trinidad</filter-name>
>
>
> <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
>    </filter>
>    <filter-mapping>
>        <filter-name>trinidad</filter-name>
>        <!-- This assumes that the FacesServlet has been registered -->
>        <!-- under the name "faces" -->
>        <servlet-name>Faces Servlet</servlet-name>
>    </filter-mapping>
>
>    <servlet>
>        <servlet-name>resources</servlet-name>
>
>
> <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
>    </servlet>
>    <!-- This cannot be configured currently -->
>    <servlet-mapping>
>        <servlet-name>resources</servlet-name>
>        <url-pattern>/adf/*</url-pattern>
>    </servlet-mapping>
>
>
>   <security-constraint>
>      <display-name>Restrict raw XHTML Documents</display-name>
>      <web-resource-collection>
>         <web-resource-name>XHTML</web-resource-name>
>         <url-pattern>*.xhtml</url-pattern>
>      </web-resource-collection>
>      <auth-constraint/>
>   </security-constraint>
>
>   <!-- uncomment <ejb-local-ref> entries when deploying to GlassFish and
> (optionally) JBoss AS 5 -->
>   <!--
>   <ejb-local-ref>
>      <ejb-ref-name>bazi/AuthenticatorBean/local</ejb-ref-name>
>      <ejb-ref-type>Session</ejb-ref-type>
>      <local-home/>
>      <local>com.bazi.action.Authenticator</local>
>   </ejb-local-ref>
>   -->
>
>   <!-- Add entries for each EJB session bean which is also a Seam component
> (not required on JBoss AS) -->
>
>   <persistence-unit-ref>
>      <persistence-unit-ref-name>bazi/pu</persistence-unit-ref-name>
>      <persistence-unit-name>../bazi.jar#bazi</persistence-unit-name>
>      <!-- The relative reference doesn't work on GlassFish. Instead, set
> the <persistence-unit-name> to "bazi",
>           package persistence.xml in the WAR, and add a <jar-file> element
> in persistence.xml with value "../../bazi.jar".
>      <persistence-unit-name>bazi</persistence-unit-name>
>      -->
>   </persistence-unit-ref>
>
> </web-app>
>
> faces-config
>
> <?xml version='1.0' encoding='UTF-8'?>
> <faces-config version="1.2" 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_1_2.xsd">
>
>    <application>
>        <message-bundle>messages</message-bundle>
>        <locale-config>
>            <default-locale>en</default-locale>
>        </locale-config>
>        <!-- Disabled when using Ajax4JSF -->
>        <!--
> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> -->
>
>
> <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
>    </application>
>    <navigation-rule>
>        <from-view-id>/*</from-view-id>
>        <navigation-case>
>            <from-outcome>dialog:memberList</from-outcome>
>            <to-view-id>/dialog/memberList.xhtml</to-view-id>
>        </navigation-case>
>    </navigation-rule>
>
> </faces-config>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message