• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Tomcat lib directory

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed Tomcat app server 4.0. I export a .war file to the %catalina_home%\webapps\ directory. When I start the server, it unpacks the .war file correctly, but I get a java.lang.NoClassDefFoundError because my application needs some 3rd party classes to run (jaxb-api.jar).
I have got the jaxb-api.jar file in the %catalina_home%\webapps\xrad2\WEB-INF\lib\ directory. If I copy it to the %catalina_home%\lib directory, my application runs fine.
My question is, how can I get Tomcat to look at my applications lib directory for the third party classes? Resin app server seems to be able to do this. Can Tomcat?
The reason I want to be able to do this, is because many users will be installing this application on different types of app servers, and I want to keep the configuration issues to a minimum. I don't want them to have to copy the 3rd party classes, they should be part of the .war file.
Thanks
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your .war file extract to webapps/xrad2? Why not package the 3rd party classes with the application? Then you'd assure everything is unpacked as a whole. Copying it to %catalina_home%\lib makes it visible to all webapps...
 
richard marais
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the application does unpack to %catalina_home%\webapps\xrad2\...
I do have my 3rd party classes in the .war file, so they get unpacked too ( %catalina_home%\webapps\xrad2\WEB-INF\lib\ ).
Is this the correct directory to put them in? Why does Tomcat not see them?
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic