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 18:52:01 UTC

help: where must I locate my custom "WebAppClassLoader"

Bonjour,
 
Excuse me for this second post, but I had no response in the mailing list.
Is my problem very complex ?

To locate a group of special classes (generated from the case tool of an
"ERP") out of the standard "WEF-INF/classes" directoy of my WebApp, I try 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.CX3WebLoa
der
 
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 custom WebAppClassLoader classe ?
I also tried to put them in "$CATALINA_HOME/common/lib/X3CLASSLOADER.jar"
but it does'nt work.
 
My context:
- W2000 SP2
- Apache httpd 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 

NOTE: although I set $CATALINA_BASE different of $CATALINA_HOME, the
directory $CATALINA_BASE/common/lib is ignored !

Thanks a lot in advance.

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

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>