You need to compile with j2ee.jar or the equivalent, but don't install
that jar (or servlet.jar or any of that ilk) with your servlet -
Tomcat provides its own equivalent at runtime. This is the way the
Servlet spec works: the container is supposed to provide the classes
in servlet.jar, and individual servlets or webapps cannot.
What class does the NoClassDefFound refer to?
--
Steve Clark
Technology Applications Team
Natural Resources Research Center/USGS
[EMAIL PROTECTED]
(970)226-9291
>>>>> Martin Davidsson writes:
Martin> Is it possible to compile OJB without using the j2ee.jar?
Martin> I'm trying to use a custom version of OJB with a Tomcat
Martin> servlet but it always throws NoClassDefFound errors. I
Martin> think it might because I don't include j2ee.jar in the
Martin> Tomcat classpath. When I do, however, I get this instead:
Martin> WebappClassLoader:
Martin> validateJarFile(/home/local/mhdavids/Scoperto/tomcat/webapps/scoperto/
Martin> WEB-INF/lib/j2ee.jar) - jar not loaded. See Servlet Spec
Martin> 2.3, section 9.7.2. Offending class:
Martin> javax/servlet/Servlet.class
Martin> Removing servlet.jar (which I've heard suggested
Martin> elsewhere) isn't an option I'm afraid. I was hoping to cut
Martin> any J2EE dependancies instead. Thanks
Martin> -- Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]