• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat 4.1.25 and *.jar location

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody !

Trying to understand class loading.

Tried to deploy a demo xml / xslt application under 4.1.25. Required libraries are crimson.jar and xerces.jar.

If these libraries are under CATALINA_HOME\webapps\myWebApp\WEB-INF\lib, the app will throw runtime errors. These two libraries must be under CATALINA_HOME\common\lib.

Why this ? the class-loader-howto at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html just states that the classes under common\lib will be overriden by those under the web application ?

Thanks if someone can explain me this.

Cheers - Nicolas Stern
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The classes under common/lib that ship with Tomcat are needed by Tomcat itself. If you remove them, Tomcat will blow up before it gets a chance to load your app.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is that Tomcat uses lots of xml so has already loaded XML libraries when it gets to your code. Also your Java installation already has XML libraries.
What happens if you run the application with the existing XML libraries?
Bill
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic