Jeanfrancois Arcand wrote: > Can you post the entire stack trace? This exception usually > occurs when > a doPrivileged block is missing (when -security). I will try to > reproduce the problem since it is a bug in Tomcat.
Jeanfrancois, I'll include the entire stack trace at the bottom on this message. Before spending time on this, let me get ahold of the jars this page uses and recompile them with the Tomcat 5 servlet jars. Yoav gave me the impression that version differences between compile and run time can cause this error. If that doesn't make this go away, I'll report back again. Thanks for your offer. > > Do you have the same exception if you don't turn security on? > What your > servlet is trying to do? Yes, I see the same thing without -security. Not clear on why it would still be using a SecureClassloader if I'm not running with -security. > > Thanks > > -- Jeanfrancois > > Guy Rouillier wrote: > >> I found this message in the archives from Michael Duffy that is >> relevant to my question: >> >> >> >> When Tomcat starts, it assumes the CLASSPATH for your >> Web app consists of: >> >> (1) The rt.jar, of course, >> (2) All the JARs in TOMCAT_HOME/common/lib, which are >> visible to all apps, >> (3) All the JARs in the TOMCAT_HOME/server/lib, which >> are visible only to Tomcat, >> (4) All the JARs in your WEB-INF/lib, which are >> visible only to your app, >> (5) All the .class files in your WEB-INF/classes, >> which are visible only to your app. >> >> That's it. >> >> If your Web app needs a JAR, put it in the WEB-INF/lib >> and you should be all set. - MOD >> << >> >> My page (which is running with a security manager, i.e, -security) is >> getting the following error (partial stack trace): >> >> java.lang.NoClassDefFoundError: >> javax/servlet/http/HttpSessionBindingListener >> at java.lang.ClassLoader.defineClass0(Native Method) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:537) >> at java.security.SecureClassLoader.defineClass(SecureClassLoader >> .java:123 ) >> >> I found that common/lib/servlet-api.jar contains this class, and if I >> manually add it to the classpath (by editing catalina.sh), my page >> will then work. According to the note above, all jars on common/lib >> should be automatically available to my pages. I haven't touched >> catalina.properties. >> >> Any idea why this jar is not being picked up automatically out of >> common/lib? Thanks. Stack trace java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionBindingListener at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1296) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1230) at org.apache.jasper.servlet.JasperLoader$1.run(JasperLoader.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:174) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:110) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at org.apache.jsp.scc.myservices.html.mpm_jsp._jspService(mpm_jsp.java:841) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.jav a:200) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:278) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFi lterChain.java:97) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterC hain.java:187) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:183) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:324) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) at java.lang.Thread.run(Thread.java:534) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
