Hi, 

I am using tomahawk tree2 in my project, but at the time of application start up
I am getting the log4j warning and ExtensionPhaseLisener Exception. The web.xml
code showing the ExtentionPhaseListener configuration is pasted below the
exception. 

Here is the exception that I am getting:

log4j:WARN No appenders could be found for logger (org.apache.catalina.
startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
java.lang.ClassCastException: org.apache.myfaces.renderkit.html.util.
ExtensionsPhaseListener
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:711)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:398)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.
java:328)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3692)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Dec 19, 2006 12:12:58 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Dec 19, 2006 12:12:58 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/TomHawk] startup failed due to previous errors

Here is the web.xml code:

<?xml version="1.0"?>
<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">
 <display-name>Test</display-name>
 <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
 </context-param>

 <listener>
  <listener-class>com.sun.faces.config.ConfigureListener</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-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-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>
       
    </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>
        
 <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.faces</url-pattern>
</filter-mapping>
 
 <filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>

</web-app>

I don't understand why is this log4j warning coming and ExtensionPhaseListener
is giving the exception.

Does somebody know how to fix this problem?

Thanks,

Sanjeev.

Reply via email to