Solved

JSF + Tomcat 5.0.25 listenerStart error, not able to deploy

Posted on 2004-09-08
6
1,962 Views
Last Modified: 2008-01-09
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
Comment
Question by:j_nash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 12013692
You need to put the JSF library on the classpath...

WEB-INF/lib

should do
0
 

Author Comment

by:j_nash
ID: 12017246
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12017291
> .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!

 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 12024908
Hope I helped :-)
0
 

Author Comment

by:j_nash
ID: 12026006
Thank you Tim, you helped indeed. : - )
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12026311
:-)

Good luck with it :-)

Tim
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question