tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve_ol...@illinoispower.com
Subject 4.0.2 and LifecyleListener seems to break classloader
Date Thu, 09 May 2002 22:08:49 GMT
We've recently tried to do our first LifecycleListener usage as part of a
small project to integrate Poolman 2.1 with Tomcat 4 so that Poolman
properly starts and stops when the container does, and provides JDBC
DataSource objects as resources defineable in server.xml and web.xml files.
(We happen to like poolman a bunch more than the Tyrex stuff).  The change
to server.xml adding the new LifecycleListener is right after the start of
the Server tag (the second lifecycle listener below is ours:

<Server port="8005" shutdown="SHUTDOWN" debug="0">

    <Listener className="org.apache.ajp.tomcat4.config.IISConfig" />
    <Listener className="com.codestudio.PoolmanServerLifecycleListener" />
    .
    .
    .

Everything works great if Tomcat is started and stopped using the vanilla
bin\startup.bat and bin\shutdown.bat.  However, if I run Tomcat as a
service, where the service is based on the exact same installation of
Tomcat that works fine in batch, then the container fails to initialize
with the call stack below.  It's almost as if the service stops seeing the
jars in the system\lib subdirectory. This only happens if I've added our
custom LifecycleListener line to server.xml, and Tomcat is running as a
service.  Does anyone know if there's something in our subclass of
LifecycleListener that could stop Tomcat from loading/using the jars in
system\lib? Something that only manifests itself if we're running Tomcat as
a service?  Just thought I'd ask before digging into the answer myself.
We've made no changes to any of the standard JARs in system\lib - the new
PoolmanServerLifecycleListener.class is deployed in
system\classes\com\codestudio directory.  Poolman and its related JARs are
in common\lib.

Thanks in advance for any info.

Config is Tomcat 4.0.2 running on JVM 1.3.1_02 on W2K SP2

Call Stack:

Create Catalina server
Exception during startup processing
java.lang.reflect.InvocationTargetException:
java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
      at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:674)
      at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1093)
      at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
      at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1076)
      at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:992)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:120)
      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.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
      at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
      at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
      at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
      at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
      at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
      at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
      at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
      at
org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:189)
      at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:171)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
      at java.lang.reflect.Method.invoke(Native Method)
      at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:428)



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message