# Tomcat stopped working

## holstebroe

I have been running tomcat since I started using gentoo without problems. The last month or so I have not used tomcat, but I run quite a few emerges, though no tomcat or java updates.

Yesterday I started tomcat through /etc/init.d/tomcat start and got this in the log:

```

ERROR reading /opt/tomcat/conf/server.xml

At Line 24 /Server/Listener/ className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0

Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener

java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener

```

I tried troubleshooting by making a emerge -C tomcat and removed the remainings of /opt/tomcat and then a emerge "<tomcat-5.0.18" + etc-update giving me some tomcat 4 server, but the problem persisted and I went back to Tomcat 5. I have tried googling and found a few posts with the same problem but no answers.

It seems that some catalina library path has vanished, but I don't know which or where to reestablish the settings.

My system parameters:

/opt/sun-jdk-1.4.2.04

2.6.5-gentoo-r1

Tomcat 5.0.18

Soren

----------

## tuxmin

Have you set JAVA_HOME correctly? Fetch the latest tomcat tarball and untar to /usr/local and see if it starts or whether you get the same error...

Hth,

Alex!!!

----------

## holstebroe

I don't think JAVA_HOME is the problem since it is the catalina files tomcat has trouble loading. Java home also looks like it is set to something sensible:

```

bash-2.05b# /etc/init.d/tomcat start

 * Starting Tomcat...

Using CATALINA_BASE:   /opt/tomcat

Using CATALINA_HOME:   /opt/tomcat

Using CATALINA_TMPDIR: /opt/tomcat/temp

Using JAVA_HOME:       /opt/sun-jdk-1.4.2.04                   [ ok ]

```

Downloading tomcat and unpacking tomcat from jakarta.apache.org did work fine, but I would prefer a working easy maintainable gentoo release.

Søren

----------

## lord

My tomcat stopped working last night after I did emerged some upgrades (not java or tomcat) .... I have the exact same problem ... I even tried to remove all files... config-files, webapps everything and emerge tomcat 5.0.18 from scratch. Still doesnt work...

Paste below is the error msg I get when I try to start a tomcat emerged from scratch w/o any modifications what so ever! For some reason tomcat cannot the content of any of the jars in ${CATALINA_HOME}/server/lib/

 *Quote:*   

> ERROR reading /opt/tomcat/conf/server.xml
> 
> At Line 24 /Server/Listener/ className=org.apache.catalina.mbeans.ServerLifecycle
> 
> Listener debug=0
> ...

 

----------

## tuxmin

Do you get some more information when you execute

```
catalina.sh debug
```

Put some line in debug or start section of catalina.sh so that your environment variables get printed

```
env
```

Alex!!

----------

## lord

The variables are correctly set :/

----------

## tuxmin

Out of curiosity I emerged tomact on my system (normally I use the distro tarballs as I like to have everything in one directory) and it just starts fine...

hm... maybe you could post your server.xml, I'd diff it with mine...

Alex!!

----------

