Solved

JSF + Tomcat 5.0.25 listenerStart error, not able to deploy

Posted on 2004-09-08
6
1,954 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache server configuration 7 88
struts spring hibernate example 12 132
null output 3 36
going to wrong jsp page 2 34
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Building a successful professional career is a long and difficult journey, especially in case if your decisions are not chosen carefully. For example, if you think that you can get to the desired position without experience and apply for it, your ch…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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