You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gattaz, Olivier" <og...@adonix.fr> on 2002/07/22 15:32:46 UTC

wher must I lacate my custom "WebAppClassLoader"

 
 
Hello,
 
To locate a group of special classes (generated from the case tool of the
Adonix ERP "X3")
out of the standard "WEF-INF/classes" directoy of my WebApp, I tried to
write
a custom WebAppClassLoader.
 
I created the two classes :
- "com.adonix.x3.x3web.tomcat.loader.CX3WebLoader"
    public class CX3WebLoader extends
org.apache.catalina.loader.WebappLoader
    {
    }
- "com.adonix.x3.x3web.tomcat.loader.CX3WebClassLoader"
   public class CX3WebLoader extends
org.apache.catalina.loader.WebappClassLoader
    {
    }
    
I defined a "Loader" tag in the "context" of my WebApp:
  <Context path="/x3webgarp"
           docBase="C:\Program
files\Adonix\X3Web\SERVERS_BASE\webapps_x3\WAWEBSERVER"
           debug="0"
           reloadable="false">
      <Loader className="com.adonix.x3.x3web.tomcat.loader.CX3WebLoader"
              delegate="false" 
              reloadable="false" 
              checkInterval="15" 
              debug="9" 
 
loaderClass="com.adonix.x3.x3web.tomcat.loader.CX3WebClassLoader" 
              X3ClassPath="D:\Adonix\X3Web\Data\X3Classes" />
  </Context>
 
But when Tomcat start, I always get the error message in the output  :
 ERROR reading C:\Program files\Adonix\X3Web\SERVERS_BASE\conf\server.xml
 At Line 217 /Server/Service/Engine/Host/Context/Loader/
className=com.adonix.x3.x3web.tomcat.loader.CX3WebLoader delegate=false
reloadable=false checkInterval=15 debug=9
loaderClass=com.adonix.x3.x3web.tomcat.loader.CX3WebClassLoader 
 Catalina.start: java.lang.ClassNotFoundException:
com.adonix.x3.x3web.tomcat.loader.CX3WebLoader
 
My classes are in a jar file , in the lib directory of my WebApp :
C:\Program
files\Adonix\X3Web\SERVERS_BASE\webapps_x3\WAWEBSERVER\WEB-INF\lib\WAWEBSERV
ER.jar
 
Where must I store my WebApp classLoader classes ?
I also tried to put them in "$CATALINA_HOME/common/lib/X3CLASSLOADER.jar"
but it does'nt work.
 
My config:
- W2000 SP2
- Apache 2.0.39 + Mod_jk
- Sun JDK 1.3.1_03
- Tomcat 4.0.4
  - set CATALINA_LOG=D:\Adonix\X3Web\data\SERVERSLOGS\TOMCAT
  - set CATALINA_HOME=C:\Program Files\Apache Tomcat 4.0
  - set CATALINA_BASE=C:\Program files\Adonix\X3Web\SERVERS_BASE
  - set JAVA_HOME=C:\jdk1.3.1_03
  - running like a service and configured for multiple instances by setting
$CATALINA_BASE to "C:\Program files\Adonix\X3Web\SERVERS_BASE"
  - NOTE: although I set $CATALINA_BASE different of $CATALINA_HOME, the
directory $CATALINA_BASE/common/lib is ignored !
 

Olivier Gattaz 
Adonix - 5 avenue Victor Hugo - 38130 Echirolles - France