Fedora 9: NoClassDefFoundError (LogFactory) starting Tomcat from Fedora Eclipse
I apologize. I already cross posted this message on FedoraForum.org but didn't generate any responses. And then I found THIS list. If this list isn't the appropriate one for this question then please slap me down. I'll take my licks. ;-)
I feel silly asking this question. I'm not totally a Tomcat/Eclipse/Java noob...but I feel like one asking this question. And Google's even my BFF...but I can't figure this one out...yet.
I have a brand new clean installation of Fedora 9.
I let the installer automagically install Fedora Eclipse, Tomcat and Java for me.
I'm fully patched (yum update).
Then I installed the Sysdeo Tomcat plugin. From the plugin I pointed to Tomcat base: /usr/share/tomcat5
When I launch Tomcat from Fedora Eclipse, I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Boo tstrap.java:54)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 23)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 68)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:336)
... 1 more
Here is the output from the instructions listed on this page:
# for f in `rpm -aq | egrep "eclipse|swt"`; do rpm -qV $f; done
# which java
# readlink -f `which java`
# which javac
# readlink -f `which javac`
# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Client VM (build 1.6.0-b09, mixed mode)
Now here's where it got really interesting. Since it was complaining about LogFactory, I located it inside /usr/share/tomcat5/bin/commons-logging-api.jar
So, just for grins, I unjar'ed the contents of:
Then I jar'ed all of the contents of those two jar files back into:
And now I can launch Tomcat from Fedora Eclipse just fine.
This is obviously a classpath issue....but whose? Is this a Fedora configuration problem? I don't even know how to proceed from here to clean up this mess. I'd really like to not launch Tomcat using jar files that I've hacked together...just to get it to run.
Oh, by the way, I also installed tomcat6 and had the same problem...except I now located the missing LogFactory class in tomcat-juli.jar
fedora-devel-java-list mailing list
|All times are GMT. The time now is 03:44 AM.|
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.