Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45194 - tomcat fails to start
Summary: tomcat fails to start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-20 02:03 UTC by Thomas Scheffler
Modified: 2004-03-28 05:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Scheffler 2004-03-20 02:03:56 UTC
net-www/tomcat-5.0.18 fails to start due to "NoClassDefFoundError: org/apache/commons/logging/LogFactory"
/opt/tomcat/bin/commons-logging-api.jar is in the CLASSPATH. This is the file that  has this class. It should be no problem to load it for java. Maybe it's a java bug?

Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/tomcat start && tail -f /opt/tomcat/logs/catalina.log

Actual Results:  
Mar 20, 2004 10:51:26 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Mar 20, 2004 10:51:26 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3481 ms
java.lang.reflect.InvocationTargetException
        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:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at org.apache.naming.NamingContext.<clinit>(NamingContext.java:102)
        at
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:276)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:2338)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
        ... 6 more


Expected Results:  
No exceptions and a running tomcat....

# qpkg -I -v sun-jdk
dev-java/sun-jdk-1.4.2.04-r1 *

# java-config -v
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

#emerge info
Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo-r1)
=================================================================
System uname: 2.6.3-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://gentoo.inode.at/source/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.linux.no/
ftp://gentoo.linux.no/pub/gentoo/
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="S3TC X aalib acl acpi acpi4linux alsa also apache2 arts autofs avi berkdb
bonobo clanJavaScript clanVoice crypt cups dga directfb dvd encode esd evo fbcon
foomaticdb gd gdbm gif gnome gpm gtk gtk2 gtkhtml guile hbci imap imlib imlib2
ipv6 java javascript jpeg kde ldap libg++ libwww lirc mad maildir memlimit
mikmod mmx motif mozcalendar mozilla mozp3p mozsvg mozxmlterm mpeg mysql nas
ncurses nls nptl oggvorbis opengl oss pam pcmcia pdflib perl pic png pnp ppds
python qt quicktime readline samba sdl sis slang spell sse ssl svga tcltk tcpd
tetex tiff transcode truetype unicode usb x86 xinerama xml xml2 xmms xosd xv
xvid zlib"
Comment 1 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-20 20:45:03 UTC
export CLASSPATH=$CLASSPATH:`java-config -p commons-logging` && /etc/init.d/tomcat start

Try that. I'm not sure what's up :P as I'm unable to reproduce this locally at the moment.

What version of commons logging do you have?
Comment 2 Thomas Scheffler 2004-03-21 11:05:23 UTC
There is no dependency for commons-logging in tomcat 5.0.18 so it's not installed on my system. I have a commons-logging-api.jar in /opt/tomcat/bin. This is included in the classpath through catalina.sh. This jar file includes org.apache.commons.logging.LogFactory
Permissions are set to readable for everyone. So this should also be not the problem.
I really can't explain where the error is. I had tomcat allready working and all I did was an update from dev-java/sun-jdk-1.4.2.04 to dev-java/sun-jdk-1.4.2.04-r1. But since I update every stable marked update every day it's possible that other side effects play a role here. I have reemerged tomcat allready but with no success so I opened this bug.
Comment 3 Thomas Scheffler 2004-03-28 05:26:32 UTC
emerge unmerge tomcat && rm -rf /etc/conf.d/tomcat /etc/init.d/tomcat /etc/tomcat /usr/share/tomcat /opt/tomcat /var/log/tomcat

and reconfiguring the whole thing resolves that problem which may depends on the fact that I used tomcat-5.0.16 which was posted to bugs.gentoo.org before I updated to the offical 5.0.19 ebuild of tomcat. But I'm not 100% sure about that.