Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

EAR and WebContextClassLoader

Thread view: 
Nirav - 28 Nov 2005 09:37 GMT
Hi,

I'm working on an application consisting of two components, one EJB and
one Web.
Both components share some dependecies like hibernate, spring, xwork
etc. Since EJBs are deployed first, the MANIFEST file there has entries
for classpath for loading these dependencies to ensure classloader for
Web will resolve it ( i'm assuming that ejb classloader will be parent
of web classloaders, the jboss case ), application has one lib
directory in EAR root which contains all the libraries ( i can't move
it to web-inf/lib ).

Now, for reasons, i've to move EJB component to EAR/lib directory,
works fine for EJB but Web component is not getting deployed with
bewildering, as expected, ClassNotFoundException. The problem will not
be resolved even if i write same classpath entries in Web components
MANIFEST, since the parent classloader will not be able to resolve it,
had it been loaded by child web  classloader.

My question is, is there any way i can load those dependency before Web
Component is deployed? i've tried adding classpath entries in
EAR/meta-inf/MANIFEST but didn't worked.

Nirav Thaker
iksrazal@gmail.com - 28 Nov 2005 12:44 GMT
> Hi,
>
[quoted text clipped - 20 lines]
>
> Nirav Thaker

The manifest entries have to be _exactly_ right. I suggest using the
supplied tool of the app server to do this. Just in case it isn't
clear, each WAR/meta-inf/MANIFEST needs to be edited suppling the path.
In VI it would be:

Manifest-Version: 1.0
Main-Class: null
Class-Path: lib/protomatter-1.1.8-pre5.jar lib/fazenda.jar
<blank line>

HTH,
iksrazal
http://www.braziloutsource.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.