I created a simple adf page that only had an outputText component on it.
If I run just using MyFaces, this page displays correctly.  If I add the
shale application-filter, and the shale jars, when I try to bring the
simple page up, I get the following exception in my tomcat log:

java.lang.IllegalStateException: No AdfRenderingContext
        at
oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(Core
Renderer.java:154)
        at
oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentB
ase.java:624)
        at
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
        at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
        at
oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.ja
va:100)
        at
org.apache.jsp.folderList_jsp._jspx_meth_af_document_0(org.apache.jsp.fo
lderList_jsp:307)
        at
org.apache.jsp.folderList_jsp._jspx_meth_f_view_0(org.apache.jsp.folderL
ist_jsp:107)
        at
org.apache.jsp.folderList_jsp._jspService(org.apache.jsp.folderList_jsp:
70)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:672)
        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:463)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:398)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:301)
        at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:416)
        at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:234)
        at
oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(Vie
wHandlerImpl.java:157)
        at
org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.j
ava:395)
        at
org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.j
ava:151)
        at
org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java
:175)
        at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384
)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
        at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
ter.java:144)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
        at
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationF
ilter.java:275)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
        at
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(
AdfFacesFilterImpl.java:367)
        at
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(Ad
fFacesFilterImpl.java:336)
        at
oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFace
sFilterImpl.java:196)
        at
oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java
:87)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
        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:1
48)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
        at java.lang.Thread.run(Thread.java:595) 


I am hoping that I just did something wrong, but I don't know what it
could be.  If I reference a similar page using tomahawk, the page
displays fine.

Here is my ADF page:

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
<%@ taglib prefix="af" uri="http://xmlns.oracle.com/adf/faces"; %>
<%@ taglib prefix="afh" uri="http://xmlns.oracle.com/adf/faces/html"; %>

<html>
<f:view>
    <f:loadBundle var="messages" basename="org.oclc.slx.bundle"/>
    <af:document title="Test">
        <af:outputText value="hello from ADF"/>
    </af:document>
</f:view>
</html>


The only thing defined in my faces-config is this:
<application>
        <default-render-kit-id>
            oracle.adf.core
        </default-render-kit-id>
    </application>

My web.xml has these filters defined:

<!-- Shale Application Controller Filter -->
    <filter>
        <filter-name>shale</filter-name>
        <filter-class>
            org.apache.shale.faces.ShaleApplicationFilter
        </filter-class>
    </filter>

    <!-- Shale Application Controller Filter Mapping -->
    <filter-mapping>
        <filter-name>shale</filter-name>
        <!--url-pattern>/*</url-pattern-->
        <!--dispatcher>REQUEST</dispatcher-->
        <!--dispatcher>FORWARD</dispatcher-->
        <servlet-name>faces</servlet-name>
    </filter-mapping>

    <!-- ADF FACES COMPONENTS -->
    <filter>
        <filter-name>adfFaces</filter-name>
 
<filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>

    <!-- ADF FACES COMPONENTS FILTER MAPPING-->
    <filter-mapping>
        <filter-name>adfFaces</filter-name>
        <!-- This assumes that the FacesServlet has been registered -->
        <!-- under the name "faces" -->
        <servlet-name>faces</servlet-name>
    </filter-mapping>

<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>20m</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-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>

Sorry if this was too much to dump into a question.

JB

-----Original Message-----
From: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 11:11 AM
To: [email protected]
Subject: Re: Shale and ADF Faces

>From: "Baker,Jonathan" <[EMAIL PROTECTED]>
>
> Are there any known compatibility issues between shale (or any of its 
> parts such as clay) and ADF Faces? Shale is an application-level 
> filter, and it looks like ADF faces is also an application-level
filter.
> I thought the clay view handler may also present issues. 
> 
> I just thought I would ask for any know issues before I got started to

> try not to waste time trying to make something work that can't.
> 

I'm not aware of any but I have not made the time to try putting them
together yet.  

Clay's view handler looks for viewId's ending in a *.html or *.xml
suffix.  These are the default suffixes.  The view handler is only
activated for view id's ending with these suffixes.  Otherwise, it just
delegates to the original view handler.  

I have not heard of anyone building a base clay configuration file for
the ADF components yet.  This is similar to creating a TLD.  

Month's ago a tomahawk clay configuration file was contributed.  At the
time, we thought that myfaces should package this in with the tomahawk
bundling.

I'd rather see us (Shale) package these in with clay rather than trying
to suggest that component libraries should feel obligated to bundle them
in with their archives.

I'd like to see more example applications of using clay with various
component libraries at the minimum.  If you are able to put these
together, please try to contribute it back so at a minimum we have a
simple example.


> Thanks 
> 
> JB 

Gary


> 
> 

Reply via email to