tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: can't get context to see "global" classes/jars
Date Fri, 31 May 2002 14:32:44 GMT
Is finep trying to load the Oracle driver using Class.forName(String 

You should be using

Thread.currentThread().getContextClassLoader().loadClass(String aClassName);

That will find your Oracle Driver across multiple classloaders.  It is the 
Java2 way of loading classes and necessary in an environment like Tomcat 
with its multiple classloaders.


At 09:22 AM 5/31/2002 -0300, you wrote:
>Why can't I get this right? Is Tomcat crazy?
>I have a set of classes (the package is called "finep") and the oracle 
>drivers (a file named classes12.jar).
>Well... if I place finep and the oracle drivers in the webapp/WEB-INF dir 
>(finep in /classes, classes12.jar in /lib) everything works fine... if I 
>try and place finep in $CATALINA_HOME/classes and $CATALINA_HOME/lib 
>nothing works..
>I tried unpacking classes12.jar in /classes, still doesn't work... I tried 
>to pack everything into jars and place it in /lib... still doesn't work... 
>what is the matter with this thing? Is it impossible to get this working? 
>I have several webapps that needs these (finep and oracle drivers).
>.:| Christian J. Dechery
>.:| FINEP - Depto. de Sistemas
>.:| (21) 2555-0332

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message