Hello all,

First, thank you for releasing Tomcat as free software, it is some really nice 
and valuable software.

At our company we developped an application server under java, and we used to 
have tomcat included as third-party library.
Now we would like to only have a dependency on Tomcat. Thus, we are converting 
our application server to a Tomcat webapp.

In order to have our server started when the Tomcat server starts the webapp, I 
implemented a sub class of org.apache.catalina.core.StandardContext and 
exported it in our JARs.
I set our test application to use that class in the file META-INF/context.xml (through the attribute 
"className" of the tag "<context>")
Since we want to have more than one of our application in the same server, I 
put our jars in ${catalina.home}/lib/ instead of WEB-INF/lib and I added the 
reference of every sub-folder in ${catalina.home}/lib/ to the server.loader 
parameter in ${catalina.home}/conf/catalina.properties (using *.jar)
(tried shared.loader and common.loader as well, with no use)

The problem, I get this exception at server startup :
GRAVE: Erreur lors du déploiement du répertoire upsm de l'application web
java.lang.ClassNotFoundException: eserve.framework.EserveContext
  at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
  at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
  at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
  at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
  at 
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
 Source)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1628)
  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:941)
  at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
  at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

(sorry for the french message, it does approximately mean : Error during the 
upsm directory deployment of the web application)
The eserve.framework.EserveContext class name is the one that was given to 
context/@className

I looked in the source code, and found out that the class loader of the Digest 
at that time is the one used at startup time.
I thought it would be the one from Bootstrap.catalinaLoader.
What have I done wrong ? Should I specify another classloader in a file ? I did 
not find this information in any of the following locations :
- http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
- http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
- http://www.jcp.org/aboutJava/communityprocess/final/jsr053/

Thank you for your time and sorry for this big post.
Joël.

P.S.: I am not an English expert, if something was not clear enough or 
ambiguous, please let me know and I will reformulate the best I can. Or if I 
forgot something important.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to