• 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

validateJarFile - Reg

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

I am working with Tomcat 4.1.18.

I have my own web application directory inside the webapps.
In the WEB-INF of my application, i have a foler "lib" where i place
oracle.jar and servlet.jar...

Coming to my problem, when i start my Tomcat up, he says that



WebAppClassLoader : validateJarFile("c:\Tomcat\webapps\Track\web-inf\
lib\servlet.jar) - jar not loaded. See servlet spec 2.3,section 9.7.2.
Offending class : javax/servlet/Servlet.class



What's causing this error? and what am i supposed to do, to avoid this?

Thanks....in advance..

Cheers,
Swamy.
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Swamy,

There is another servlet.jar under c:\tomcat\common\lib. The servlet.jar contains all the servlet and jsp api classes. You can view the content of servlet.jar using "jar tf servlet.jar". I suggest you remove the servlet.jar from the Track\web-inf\lib and place it in a temp directory.

Joyce
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joyce,

Thanks for the reply,

On my removing the servlet.jar from my application, what if I am deployingit on another server? Isn't the "lib" directory of my application a mandatory one?

Cheers,
Swamy
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Swamy,

Originally posted by Ramaswamy Srinivasan:
On my removing the servlet.jar from my application, what if I am deploying it on another server? Isn't the "lib" directory of my application a mandatory one?



Extracted from servlet specification 2.4, section 9.7.2:


SRV.9.7.2 Web Application Class Loader
The class loader that a container uses to load a servlet in a WAR must allow the developer to load any resources contained in library JARs within the WAR following normal J2SE semantics using getResource . As described in the J2EE license agreement, servlet containers that are not part of a J2EE product should not allow the application to override J2SE platform classes, such as those in the java.* and javax.* namespaces, that J2SE does not allow to be modified. Also, servlet containers that are part of a J2EE product should not allow the application to override J2SE or J2EE platform classes, such as those in java.* and javax.* namespaces, that either J2SE or J2EE do not allow to be modified. The container should not allow applications to override or access the container�s implementation classes. It is recommended also that the application class loader be implemented so that classes and resources packaged within the WAR are loaded in preference to classes and resources residing in container-wide library JARs.



I think by placing servlet.jar under the application lib violated the rule "servlet containers that are not part of a J2EE product should not allow the application to override J2SE platform classes, such as those in the java.* and javax.* namespaces,...". If you deploy on other web container such as Orion, such classes with namespaces javax.* can be found in orion.jar too.

Just curious, why do you need the servlet.jar in the application lib since a web container has its own version?

Let's see if others may have different opinions or workarounds.

Joyce
[ October 18, 2004: Message edited by: Joyce Lee ]
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joyce,


Just curious, why do you need the servlet.jar in the application lib since a web container has its own version?



I too was curious of this. If I try removing the servlet.jar from my application lib, it is working fine. Thanks a lot.

By the way, while making some study over the internet, i came to know of the lib directory of your web application, containing the jar files. I am not sure about that...

But things are fine now...my Tomcat doesn't say that error...

Thanks..

Cheers,
Swamy
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic