• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1973
  • Last Modified:

JSF + Tomcat 5.0.25 listenerStart error, not able to deploy

I'm trying to deploy a J2EE application to a Tomcat 5.0.25 server, the application uses JSF + Spring, it looks like there's a problem with JSF Listener (java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener), since the application fails to deploy. I'm not able to run the application. I've been able to deply other JSF applications. I wonder where is the problem. Any clue will be highly appreciated. I'm in a hurry :S....


The log file looks like this


2004-09-08 18:01:37 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-09-08 18:01:38 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2004-09-08 18:01:38 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2004-09-08 18:01:39 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2004-09-08 18:01:39 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2004-09-08 18:01:41 StandardContext[/capacitacion104]Error configurando escuchador de aplicaciĆ³n de clase com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3753)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:613)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
      at org.apache.catalina.core.StandardService.start(StandardService.java:476)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)


This is my web.xml


<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

      <!-- Faces Servlet -->
      
      <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>
      
      
      <listener>
      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
      </listener>

      <!-- JSF Configs -->
      <context-param>
          <param-name>javax.faces.CONFIG_FILES</param-name>
          <param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-managed-beans.xml,/WEB-INF/faces-navigation.xml</param-value>
        </context-param>
      
      
      <!-- Spring Servlet -->
      <servlet>
               <servlet-name>SpringContextServlet</servlet-name>
               <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>       
              <load-on-startup>1</load-on-startup>
      </servlet>
      
        <!-- Spring Configuration -->
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
  </context-param>

      
      
      <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>

      <error-page>
            <error-code>404</error-code>
            <location>/error.jsp</location>
      </error-page>

</web-app>


Regards,

julian
0
j_nash
Asked:
j_nash
  • 4
  • 2
1 Solution
 
TimYatesCommented:
You need to put the JSF library on the classpath...

WEB-INF/lib

should do
0
 
j_nashAuthor Commented:
The problem was that appearently libraries were not accesible, since I had organised them into folders in WEB-INF/lib, i.e., WEB-INF/lib/jsf/ for JSF libraries etc....I thought this could be done....is that a real reason?
0
 
TimYatesCommented:
> .I thought this could be done

Nope :-(

> is that a real reason?

Yes :-)

Yeah, it's a pain that you can't organise libraries better...  I hate how the lib directory bloats, and you can't rmember what was added for what...  (I'm using jboss/hibernate/tomcat/struts at the moment, and I think I'm going lib blind) ;-)

Good luck!!

Tim
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
TimYatesCommented:
Hope I helped :-)
0
 
j_nashAuthor Commented:
Thank you Tim, you helped indeed. : - )
0
 
TimYatesCommented:
:-)

Good luck with it :-)

Tim
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now