Hi Pete
Thanks. I have ow loaded all classes into the webinf/classes directory and all jars
into web-nf/lib. This seems to work.
One interesting exception to the above however. I am using Turbine in a corba
environment (ORB - Visibroker). When I place the Visibroker jar files in the
webinf/lib directory, I get the ff exception :
java.lang.ExceptionInInitializerError: org.omg.CORBA.INITIALIZE:
However, when I move these Visibroker jar files to the Tomcat classpath, then it
works.
Any ideas why this is different?
Regards
Chris
PS. By the way, is there anyone else out there using Turbine talking to a Visibroker
Corba server??
>>> Peter Donald <[EMAIL PROTECTED]> 09/12/00 04:08PM >>>
At 02:01 12/9/00 +0200, you wrote:
>4. My application has classes in Web-Inf/classes and ONE OTHER DIRECTORY
as well. This other directory has been specified in Tomcat's classpath, and
some of these classes are actually being executed.
This could be the problem - you may need to place it in lib or classes
>I now have no idea what is wrong, and this problem is driving me around
the bend.
I know that feeling :P - I do it on an almost weekly basis :P
>One other question: What is the order of the classpath which Tomcat
searches - is it webinf/classes, webinf/lib, and then the specified Tomcat
classpath?
Well think it as a chain of CLs. The basic CL is primordial ( holds what is
in CLASSPATH ), then the next is Tomcat CL, then the next is WEB-INF/lib CL
and at top is WEB-INF/classes CL. Look below where A <-- B means a is the
parent of B.
Primordial CL (C1) <-- Tomcat CL (C2) <-- Lib CL (C3) <-- classes (C4)
If a class is loaded in C1 then it can't load anything from C2+.
So if you have tomcat classes in C3 it can not load any classes from C4 if
it needs to resolve a class but C4 can load C3.
So try and make sure all dependancies go down the chain not upward.
This is even more difficult if you have the same class in multiple CL as
then com.biz.Blah loaded from C3 is a completely different class than
com.biz.Blah loaded from C4 even if they are identical and you can't cast
between them.
There are also issues when you turn on autoreloading etc.
Basic tips are
* try to keep all dependancies as *high* up chain as possible
* don't make upwards dependancies
* make sure different copies of class are not present in different CLs
Other than that you have to have a play - sorry wasn't very useful eh :P
I only really learnt about it through experimenting.
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*-----------------------------------------
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]