Hi, in Geronimo, JFace API related classes is loaded by Jee-spec classloader.
From my view, this should be a defect of MyFace, I guess it load your customized exception handler classes using Class.forName, so the ClassNotFoundException error occured
Could you please try to add the dependcy of MyFaces in your geronimo-web.xml file
-----
<dep:environment>
        <dep:moduleId>
            <dep:groupId>default</dep:groupId>
            <dep:artifactId>TestWeb</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
        <dep:dependencies>          
            <dep:dependency>
                <dep:groupId>org.apache.myfaces.core</dep:groupId>
                <dep:artifactId>myfaces-api</dep:artifactId>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
        <dep:hidden-classes>
            <dep:filter>javax.faces</dep:filter>
        </dep:hidden-classes>
    </dep:environment>

It should have the same effect with copying those myfaces jars into the lib folder.

2009/2/26 Pavel Janoušek <janousek@fonet.cz>
       Hello,

       I'm trying to write own ErrorHandler for handling Exceptions. It's based on Tomahawk ErrorRedirectJSFPageHandler with some other attributes in ExceptionContext (error identificator for BFU etc.).

       When I deploy web application under common way (WAR), all is OK, but when MyFaces catches exception and try to redirect processing to my own handler (specified in web.xml by parameter org.apache.myfaces.ERROR_HANDLER) I got error from Tomcat:

javax.servlet.ServletException: Error-Handler : cz.pajasoftovi.TestJSF.ErrorRedirectJSFPageHandler was not found. Fix your web.xml-parameter : org.apache.myfaces.ERROR_HANDLER
       javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:248)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:160)

root cause

java.lang.ClassNotFoundException: cz.pajasoftovi.TestJSF.ErrorRedirectJSFPageHandler in classloader org.apache.geronimo.framework/jee-specs/2.1.4-SNAPSHOT/car
       org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:438)
       org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:280)
       java.lang.ClassLoader.loadClass(Unknown Source)
       java.lang.ClassLoader.loadClassInternal(Unknown Source)
       java.lang.Class.forName0(Native Method)
       java.lang.Class.forName(Unknown Source)
       javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:240)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:160)


       Yes, I known this is classloading issue... so I'm trying to add MyFaces JSF (1.2) implementation (myfaces-api, myfaces-impl) to application WEB-INF/lib directory and in Geronimo deployment descriptor I'm hiding javax.faces and org.apache.myfaces to prevent loading the Geronimo server version of MyFaces (my and Geronimo version are though identical) and all is working AS EXPECTED.

       So my simple question is how to modify web.xml (or better in geronimo-web.xml) to working as expected with Geronimo server bundled MyFaces package? How to modify classloading by deploy descriptor (inverse-classloading... don't work)? It's possible by modify deploying descriptor or some special GBEAN configuration is required? I don't like to distribute own version of MyFaces...

       Thanks

Ing. Pavel Janoušek
technická podpora

E-mail: janousek@fonet.cz
FoNet, spol. s r.o.
Za Kovárnou 9, 625 00 Brno
Tel.: +420 543 244 749
Fax.: +420 543 244 751
WWW : http://WWW.FoNet.Cz/





--
Ivan