incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: IllegalStateException: No AdfRenderingContext
Date Thu, 27 Apr 2006 19:58:59 GMT
Already answered on the Facelets list...  the answer is that
you should define the FaceletViewHandler only in web.xml,
not in faces-config.xml (it's defined in both).

-- Adam

On 4/27/06, Sloan, Noah M <Noah_Sloan@baylor.edu> wrote:
> I posted this to the Facelets mailing list, but thought here might be more appropriate.
>
> I'm trying to setup a new application with MyFaces, Tomhawk, Facelets and ADF.  I get
the following:
>
> java.lang.IllegalStateException: No AdfRenderingContext
>         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:154)
>         at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
>         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
>         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
>         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
>         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 oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
>         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
>         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
>         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
> ...
>
> when I try to render:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <af:document xmlns="http://www.w3.org/1999/xhtml"
>         xmlns:ui="http://java.sun.com/jsf/facelets"
>         xmlns:f="http://java.sun.com/jsf/core"
>         xmlns:c="http://java.sun.com/jstl/core" xmlns:h="http://java.sun.com/jsf/html"
>         xmlns:af="http://xmlns.oracle.com/adf/faces">
>         <af:form>
>                 <af:poll interval="1000" id="time"/>
>                 <af:outputText value="#{sampleBean.now}" partialTriggers="time"/>
>         </af:form>
> </af:document>
>
> My web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
>         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>         <context-param>
>                 <param-name>facelets.LIBRARIES</param-name>
>                 <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
>         </context-param>
>         <!-- Use Documents Saved as *.xhtml -->
>         <context-param>
>                 <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>                 <param-value>.xhtml</param-value>
>         </context-param>
>         <!-- Special Debug Output for Development -->
>         <context-param>
>                 <param-name>facelets.DEVELOPMENT</param-name>
>                 <param-value>true</param-value>
>         </context-param>
>         <context-param>
>                 <param-name>oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER</param-name>
>                 <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>         </context-param>
>         <filter>
>                 <filter-name>adfFaces</filter-name>
>                 <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
>         </filter>
>         <filter>
>                 <filter-name>extensionsFilter</filter-name>
>                 <filter-class>
>                         org.apache.myfaces.component.html.util.ExtensionsFilter
>                 </filter-class>
>         </filter>
>         <filter-mapping>
>                 <filter-name>adfFaces</filter-name>
>                 <servlet-name>Faces Servlet</servlet-name>
>         </filter-mapping>
>         <!-- MyFaces extensions filter -->
>         <filter-mapping>
>                 <filter-name>extensionsFilter</filter-name>
>                 <url-pattern>*.jsf</url-pattern>
>         </filter-mapping>
>         <listener>
>                 <listener-class>
>                         org.apache.myfaces.webapp.StartupServletContextListener
>                 </listener-class>
>         </listener>
>         <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>resources</servlet-name>
>                 <servlet-class>
>                         oracle.adf.view.faces.webapp.ResourceServlet
>                 </servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <servlet-name>resources</servlet-name>
>                 <url-pattern>/adf/*</url-pattern>
>         </servlet-mapping>
>         <!-- extension mapping -->
>         <servlet-mapping>
>                 <servlet-name>Faces Servlet</servlet-name>
>                 <url-pattern>*.jsf</url-pattern>
>         </servlet-mapping>
>         <!-- Welcome files -->
>         <welcome-file-list>
>                 <welcome-file>index.jsp</welcome-file>
>                 <welcome-file>index.html</welcome-file>
>         </welcome-file-list>
> </web-app>
>
> and my faces-config.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE faces-config PUBLIC
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
>   "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
> <faces-config>
>         <application>
>                 <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
>                 <default-render-kit-id>oracle.adf.core</default-render-kit-id>
>                 <locale-config>
>                         <default-locale>en</default-locale>
>                 </locale-config>
>         </application>
> </faces-config>
>
> and finally the contents of WEB-INF/lib:
>
> adf-facelets.jar
> adf-faces-api-10_1_3_0_4.jar
> adf-faces-impl-10_1_3_0_4.jar
> adfshare.jar
> commons-beanutils-1.7.0.jar
> commons-codec-1.3.jar
> commons-collections-3.1.jar
> commons-digester-1.6.jar
> commons-el-1.0.jar
> commons-fileupload.jar
> commons-lang-2.1.jar
> commons-logging-1.0.4.jar
> el-api.jar
> el-ri.jar
> jsf-facelets.jar
> jstl-1.1.0.jar
> myfaces-api-1.1.2.jar
> myfaces-impl-1.1.2.jar
> tomahawk.jar
>
> Oh and pages without ADF components render fine. Anyone see what I'm missing?
>
>
>

Mime
View raw message