Solved

JSF + Tomcat 5.0.25 listenerStart error, not able to deploy

Posted on 2004-09-08
6
1,946 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
  • 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now