I finally solved the classloader problems I had a
couple weeks ago.

The symptoms were I couldn't find resource files I
knew were in WEB-INF/classes, and I couldn't load
certain third-party jars.

I found that some of my classes were (necessarily)
being packaged up in my EJB jar file, as well as in my
webapp.  The problem was that even though I was
invoking these classes from JSP's, they got loaded
from the EJB jar file, *not* from the webapp.  This
left them using a classloader with very little in it's
classpath, and no knowledge of the webapp paths.  So,
effectively, those classes *didn't* know about
WEB-INF/classes.

I realize now that this is normal behavior and not
bugs in the classloader, but it can be pretty
confusing - and hard to debug.  I got around the
problem by adding <library> tags to my
orion-application.xml that point to WEB-INF/classes
and WEB-INF/lib.  Now everything works correctly.

Does anyone know a better way to share classes or libs
between a webapps and EJBs? (in the same enterprise
app)

roger


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Reply via email to