[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: java.lang.SecurityException: sealing violation
- From: Michael Brennan <Michael_Brennan@Allegis.com>
- To: 'Anne Beug' <asbeug@yahoo.com>, xml-dev@lists.xml.org
- Date: Wed, 21 Mar 2001 20:04:04 -0800
I believe a sealing violation means you have a "sealed" package (i.e. a
package in a library whose manifest specifies that all classes for that
package must be loaded from the same library), but for some reason, an
attempt is being made to load different classes from the package from
different libraries.
My guess would be you have more than one DOM implementation on your
classpath, and that's the source of the problem.
> -----Original Message-----
> From: Anne Beug [mailto:asbeug@yahoo.com]
> Sent: Tuesday, March 20, 2001 10:37 PM
> To: xml-dev@lists.xml.org
> Subject: java.lang.SecurityException: sealing violation
>
>
> I can get this code to compile fine, but when I run
> it, I get the exception below. Any ideas?
> Thanks,
> Annie
>
> import java.io.*;
> import org.w3c.dom.*;
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.parsers.DocumentBuilder;
> import javax.xml.parsers.ParserConfigurationException;
>
> public class DOMTest
> {
> public static void main (String argv [])
> throws IOException, DOMException,
> ParserConfigurationException
> {
> DocumentBuilderFactory factory =
> DocumentBuilderFactory.newInstance();
> DocumentBuilder builder =
> factory.newDocumentBuilder();
> System.exit(0);
> }
> }
>
> Exception in thread "main"
> java.lang.SecurityException: sealing violation
> at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
> at
> java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> at
> java.security.AccessController.doPrivileged(Native
> Method)
> at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> at java.lang.ClassLoader.defineClass0(Native
> Method)
> at
> java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.
> java:111)
> at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
> at
> java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> at
> java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> at
> java.security.AccessController.doPrivileged(Native
> Method)
> at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> at
> java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> at
> org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.newDocument
> Builder(DocumentBuilderFactoryImpl.java:82)
> at DOMTest.main(DOMTest.java:13)