Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 17068 invoked from network); 9 Nov 2000 23:27:01 -0000 Received: from adsl-63-195-55-166.dsl.snfc21.pacbell.net (HELO cube.eionlineinternal.com) (63.195.55.166) by locus.apache.org with SMTP; 9 Nov 2000 23:27:01 -0000 Received: (from nobody@localhost) by cube.eionlineinternal.com (8.11.0/8.11.0) id eA9NE7511036; Thu, 9 Nov 2000 15:14:07 -0800 X-Authentication-Warning: cube.eionlineinternal.com: nobody set sender to satan@totalsync.com using -f Received: from matrix.eionlineinternal.com ([192.168.1.20]) (SquirrelMail authenticated user satan) by mail.totalsync.com with HTTP; Thu, 9 Nov 2000 15:14:07 -0800 (PST) Message-ID: <3740.192.168.1.20.973811647.squirrel@mail.totalsync.com> Date: Thu, 9 Nov 2000 15:14:07 -0800 (PST) Subject: Re: [T4m4] java.lang.SecurityException From: To: tomcat-dev@jakarta.apache.org In-Reply-To: <3A0AF974.A79C9608@eng.sun.com> References: <3A0AF974.A79C9608@eng.sun.com> X-Mailer: SquirrelMail (version 1.0pre1 (cvs)) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N >satan@totalsync.com wrote: > >> I am trying to run T4m4 with my webapp and I am receiving a >> >> java.lang.SecurityException : sealing exception >> >> This is because my servlet is trying to instantiate a singleton object >> in the webapp that reads its config info from a file on the classpath >> using a mildy modified version of the XML mapper from Tomcat (just >> renamed the package so I can use it). >> >> I was under the assumption that the security stuff didn't run if you >> just ran bin/startup.sh. Is that still the case? >> > > "Sealing violation" problems just started showing up in m4. The only > thing I can think of that's different is I compiled with optimization > on, but it's still under investigation. As I understand it, a sealing > violation means you're trying to load a class in a particular package > from a different JAR file than other classes of that same package were > found. > > One issue you might run into with the "modified XML mapper" is that, if > the mapper classes themselves are on the system class path, they won't > be able to see classes in WEB-INF/classes or WEB-INF/lib/*.jar -- class > loader delegation goes up the hierarchy, but not down. You might need > to ensure that all your classes are under WEB-INF (or all your classes > are on the classpath) to make this work. > > I ran into exactly this situation with the Digester module in Struts > , which is pretty similar in > principle to XmlMapper, and it is one of the reasons for the > restriction that struts.jar *must* be in your WEB-INF/lib directory. Thanks, Craig. All of my code is in either WEB-INF/classes or WEB- INF/lib. One thing I have noted to do in ALL of my java development is to NEVER specify a classpath in my environment. I always make the program invoke using its needed classpath. Less ambiguity that way ;-) I'll keep looking ;-) Scott Sanders