Sealing violations happen when classes for a 'sealed' package are loaded
from more than one source. So indeed it's likely you have different versions
of the same JARs. One seals a package (or an entire JAR) by specifying the
sealed attribute in the JAR's manifest. Try running Ant with the java.exe
flag -verbose:class to see which classes are loaded from where to
troubleshooting your problem, and also peak into your various JAR
manifests... --DD

-----Original Message-----
From: Jason Russ [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 15, 2002 1:28 PM
To: 'Ant Users List'
Subject: RE: SecurityException: sealing violation

Thank you for your reply Mark.

I have seen similar postings in the news group
so I was sure to set the classpath to a blank list.
(i.e. set CLASSPATH= ).  The only jars that I can
think of that are being used are those in the Ant/lib
directory and the jre/lib & jre/lib/ext directories.

Jason Russ

-----Original Message-----
From: Mark Fortner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 2:26 PM
To: Ant Users List
Subject: Re: SecurityException: sealing violation


Jason,
I've seen this happen with other programs.  It usually occurs when there 
are two versions of a JAR file in the classpath.  For example, if you 
had the Ant 1.4.1 and Ant 1.5.1 JARs in the classpath, the classloader 
would get confused as to which version you wanted.

Mark
Jason Russ wrote:

>Can anyone tell me why I'm getting this exception?
>How do I figure out what class/jar it is trying to load?
>Does ant 1.5.1 require JDK 1.4?
>
>Thanks for any help,
>Jason Russ
>
>Sr. Software Engineer
>McCabe & Associates
>Columbia MD
>
>
>D:\java\downloads\jakarta-ant-1.5.1>set CLASSPATH=
>
>D:\java\downloads\jakarta-ant-1.5.1>ant -verbose
>Apache Ant version 1.5.1 compiled on October 2 2002
>Buildfile: build.xml
>Detected Java version: 1.3 in: D:\java\jdk1.3.1_04\jre
>Detected OS: Windows NT
>
>BUILD FAILED
>java.lang.SecurityException: sealing violation
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:229)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:115)
>        at org.apache.tools.ant.Project.init(Project.java:269)
>        at org.apache.tools.ant.Main.runBuild(Main.java:583)
>        at org.apache.tools.ant.Main.start(Main.java:196)
>        at org.apache.tools.ant.Main.main(Main.java:235)
>
>Total time: 0 seconds
>java.lang.SecurityException: sealing violation
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:229)
>        at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:115)
>        at org.apache.tools.ant.Project.init(Project.java:269)
>        at org.apache.tools.ant.Main.runBuild(Main.java:583)
>        at org.apache.tools.ant.Main.start(Main.java:196)
>        at org.apache.tools.ant.Main.main(Main.java:235)
>sealing violation
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to