Why is tomcat looking for JSF classes?

I am trying to get my development environment up and running, and I am having trouble with Tomcat trying to load JSF classes for some reason. My application does not use JSF; in fact, I haven't even deployed my application to tomcat yet. I am getting a number of stack traces in the startup logs and I cannot load the default tomcat homepage when I try to open http://localhost:8080 (I just get the tomcat 404 page).

Here is what the first stack trace is:

SEVERE: Error configuring application listener of class com.sun.faces.util.ReflectionUtils$ReflectionUtilsListener
java.lang.ClassNotFoundException: com.sun.faces.util.ReflectionUtils$ReflectionUtilsListener
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    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:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

I also get similar stack traces for the following other classes:


I'm not sure if this is relevant, but I am running Tomcat 5.5.27 with the 1.4 compatibility pack installed, with Java 1.4.2, on Mas OS 10.5.

Thanks for any ideas!

EDIT: It seems that each of the default applications that come with Tomcat (host-manager, balancer, tomcat-docs, jsp-examples, etc) was relying on these JSF classes. I removed these default applications, and everything seems to be working.

So, my question is now: Why does tomcat come with applications that don't include their dependencies, and what do I need to do to make those default applicaitons work?

Asked by: Aldus936 | Posted: 28-01-2022

Answer 1

Is your tomcat installation totally clean, or is it one you have inherited?

Check if the webapps contains existing wars/directories which may be referencing JSF classes?

UPDATE: Ah -- I see you found this was the case :-)

Not sure why tomcat doesn't include all its dependencies. Perhaps you downloaded a developer release instead of a stable one?

Answered by: John686 | Posted: 01-03-2022

Answer 2

You might have to clean the Tomcat work directory.

Answered by: Gianna906 | Posted: 01-03-2022

Similar questions

java - how many classes per package? methods per class? lines per method?

I have to give a general note to some huge Java project for which I have but little visibility and I was wondering if there were any guidelines for determining: what number of classes per package can be considered right, to low, or to high (this project has 3.89 classes per package, which seems a bit too small for me), number of methods per class? (this project has 6.54 methods per class...

Where can I find the following classes in Java

I am a .NET dev learning Java. As a result, I understand all the fundamentals of programming like loops, variables, functions, etc. My biggest bottleneck is that I don't know my way around Java's packages like I do with .NET's. This is the reason for this thread - where do I find the following functionality in Java?: System.Diagnostics - where can I use things like stopwatch, programmatic breakpoints and lo...

Where are java classes stored in Oracle?

Where is the java bytecode for loaded java classes stored within an oracle database? Specifically, is there a view or table I can use to obtain the raw bytes for java class schema objects within Oracle?

java - Remove nested test classes with maven2

I use nested classes for accessing private members in JUnit tests. They are alaways named "TestProxy". I would like to remove them at Build time using maven2, to not include it into the jar file. Is there any configuration option? Can it be done with a plugin? If so, a prototype would be nice! ;-) Thanks Edit: Why use private methods? I need to inject data from 3rd p...

java - How to deal with the most common classes missing on J2ME

I'm trying to code an application which runs un different java platforms like J2SE, J2ME, Android, etc. I already know that I'll have to rewrite most of the UI for each platform, but want to reuse the core logic. Keeping this core portable involves three drawbacks that I know of: Keeping to the old Java 1.4 syntax, not using any of the nice language features of Java 5.0 only ...

java - JPA: Should I clean up my entity classes using orm.xml?

I currently use JPA annotations only, but I really don't like that I'm polluting my entity classes with so many ORM details which really aren't relevant to their behavior (e.g. table name, id generation strategies, join columns...). I see that DataNucleus recommends putting ORM-related annotations in XML instead (...

class - How can I use the java for each loop with custom classes?

I think most coders have used code like the following : ArrayList<String> myStringList = getStringList(); for(String str : myStringList) { doSomethingWith(str); } How can I take advantage of the for each loop with my own classes? Is there an interface I should be implementing?

Maven: Java classes don't compile after Ant task

My project generates source code using the Rats! parser generator. Rats! doesn't have a Maven plugin that I'm aware of, so I'm trying to build the parser using an Ant Java task, like so: <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>generate-sou...

java - How to use classes from another project?

I have got two Java projects inside Eclipse. Now I want to use classes from project A in project B. I added project A to the build path of project B. But the classes are not available in project B. What could be the reason for that problem? Did I do something wrong? What and how should I do? Thanks in advance. Update: The problem was that the classes to be imported were in the defau...

Java Help: Using Classes

Now I have read and on this but i am just stuck. Any help appreciated. I am looking for hints. The code compiles and runs fine but I don't think the variables are being stored in the employee class and I am not sure I am understanding my use of the constructor right. Requirements: I have completed: Values are checked to ensure they are positive numbers. Entering stop as the em...

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)