tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nehal Sangoi" <>
Subject RE: unable to load classes
Date Wed, 11 Jan 2006 14:03:10 GMT

How can i change the default classloading hierarchy in Tomcat 5.5.9 ? And
would that affect in my Tomcat setup anyway?

Please reply to my query because i am stucked up badly at this problem.

-----Original Message-----
From: Nehal Sangoi []
Sent: Friday, January 06, 2006 9:58 AM
To: 'Boris Unckel'; Tomcat Users List (E-mail)
Subject: RE: unable to load classes

Hi Boris,

I will explain the issue thoroughyl, and the options i tried so far to
resolve the same.

Environment Details :
OS : Linux Enterprise
Tomcat 5.5.9
Apache HTTP Server 2.0.54
Apache and Tomcat reside on physically different server.
All Tomcat applications are SiteMinder Enabled.

I have one base installation of Tomcat and Multile Tomcat Instances created
(each with diff user). I am not at all starting base-tomcat in my
environment. My Tomcat Instances are running.

Java - JDK used is 1.5 -- latest one.

Now, i have several applications, which have framework in it. Technically, i
don't understand what framework is as i am basically a UNIX Admin and
administer Tomcat+Apache.

The applications, which use framework, are using following two jarfiles.


If i keep these jarfiles into any tomcat instance's WEB-INF/lib, the
application runs absolutely fine. As i mentioned earlier, the above two
jarfiles would be used by many other tomcat instances/applications too.
Hence, i wanted these jarfiles be kept in either base tomcat's common/lib or
shared/lib and symlinks be created into every tomcat instance's shared/lib
dir. Doing this, it will ease up my administration task in future.

Unfortunately, its not doing.


Description of exact problem and options tried so far :

Note : wherever i am keeping these jars, keeping only single copy of it at
one particular location by discarding them out from any other classpath.

I kept both the jarfiles into base-tomcat's common/lib and created symlink
into the application's shared/lib folder. Ideally, this should work, because
i have 3 more other jarfiles (third party) linked this way and they are
working well. But tomcat is not picking up these two jarfiles from
common/lib and results in Null Pointer Exception. Also, it registers nothing
in catalina.out.

Later, i kept both the jarfiles in shared/lib dir of that tomcat instance
itself. This too did not work and resulted in No classdef found error.

After that, i kept both into shared/lib of base-tomcat and again created
symlinks into shared/lib of application. No luck.

Again, i changed my mind and converted the jarfiles into classes and placed
those classes into shared/classes folder of application. but :((

Finally, i exported the explicitly defined CLASSPATH variable into
application user's profile and tried for tomcat to pick from there atleast
and here too, no hope.

If you read my mail closely, i have tried out almost all options.

I went through the "classloader" documentation of Tomcat 5.5 on jakarta
website. Theoratically, my application should work, the way i am thinking of
but practically its failing.

Regarding Servlet API, yes, you are right. There is default sevlet-API jar
in Tomcat's Internal Classes.


I think, i have replied to your queries. If you need any more info, please
let me know. I am awaiting for a solution to come out to overcome this issue
as i need to implement the same into my Production Environment.

Thanks & Regards,

-----Original Message-----
From: Boris Unckel []
Sent: Thursday, January 05, 2006 6:02 PM
Subject: RE: unable to load classes

> I tried keeping into shared/lib of that particular application. But it
> reflects the same error again. My requirement of putting these two jars
> in
> shared/lib or common/lib is because i need to use them for other 20 more
> applications. Hence, it would be more convenient to keep one copy and
> access
> by multiple applications rather copying them to every application's
> WEB-INF/lib.
> Kindly, suggest some solution for this.
> > But, unfortunately, i get Null Pointer Exception. And my jarfiles or
> > say
> > classes are not getting loaded.
> > One of my jar contains servlet API in it.
Just to make it clear:
The classes/jars are NOT provided by you/by default through System
Classpath/Classloader, are NOT provided by you/by default through the
The classes/jars are NOT in WEB-INF/lib.
There is just one copy (without any links to it) in shared/lib.

Do you fullfill the mentioned conditions for servlet API too?
I think the servlet API is provided by default through commons/lib.

Your problem exists still if the mentioned conditions are true?

Could you post the exact message/stacktrace?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message