This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Tomcat won't startup anymore.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm running Tomcat 5.5.9 with JDK 1.4.1. The server had been working fine until recently but now when I try to start up the server using startup.bat I am seeing ClassNotFoundExceptions for various classes which I know are in TOMCAT_HOME/server/lib/catalina.jar. So, it would appear that the classpath being used by tomcat is incorrect. I tried adding the catalina.jar path to my system classpath to no avail. I also tried reinstalling tomcat but I continue to see the same problem.

Any help would be greatly appreciated.
Wes

Here is the exact error I am seeing.

ERROR reading C:\jakarta-tomcat-5.5.9\conf\server.xml
At Line 47 /Server/Service/Engine/Realm/ className=org.apache.catalina.realm.Use
rDatabaseRealm

Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.realm.User
DatabaseRealm
java.lang.ClassNotFoundException: org.apache.catalina.realm.UserDatabaseRealm
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616)
at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)

at org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91
)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat does not use the system environment CLASSPATH so that explanation is out. Have you installed any software that may have added a JAR file to your JAVA_HOME directories?
Bill
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You said Tomcat 5.5 was working with j2sdk1.4.
I assume then that you've installed compat package which is required for Tomcat 5.5 to run with JRE's under 1.5?
 
Wesley Wright
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies. I did have the compat package installed. I had added a couple of jars to C:\j2sdk1.4.1_02\jre\lib\ext (my oracle driver and j2ee.jar to be specific) because I had read that adding jars to those directories would include them in your classpath always. I removed those jars and tomcat starts again.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Tomcat ships with the parts of J2EE that it needs to run.

Thank you for writing back.
 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post your environment settings:

Start -> Run
cmd
> set

We're looking for JAVA_HOME, CATALINA_HOME, CLASSPATH and JAVA_HOME
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!