• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Tomcat 4.1.25 and *.jar location

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!