Solved

JSF + Tomcat 5.0.25 listenerStart error, not able to deploy

Posted on 2004-09-08
6
1,952 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
J2SE 5.0 metadata 1 56
squirrelPlay java challenge 40 158
IE doesn't Invoke servlet in iframe 1 111
struts spring hibernate example 12 122
When you’re making plans to join the modern business race, you should analyze various details that may affect your results. Nowadays, millions of businesses are trying to grow into established and appreciated professional enterprises.
An article on effective troubleshooting
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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