9

I am using GWT for my Java application. When I try to run it as web application, I get the following error:

java.lang.SecurityException: sealing violation: can't seal package org.mortbay.util: already loaded

I can't find anything helpful if I Google for the error. Am I missing something?

0

3 Answers 3

8

It means the package is sealed and you tried to load another jar also containing the package.

See Sealing Packages within a JAR File.

1
  • org.mortbay.util is a package of jetty, so you can look, if you have multiple jars of jetty in your classpath. As you are using GWT, I think it could include jetty by itself, so try removing all jetty jars from your classpath.
    – Sandro
    Apr 10, 2012 at 17:22
3

Your current exception shows that you are using Jetty in your project. Possible problem might be that you have this jar available twice in your classpath.

0
1

Goto your jar file,you will see .MF file.Open it.You will find Sealed:true. Edit it, make it false.Over.

1
  • 3
    Better find the source of a duplicated jar. What will you do if one of your components gets updated? You will get a mess at the end.
    – Dime
    May 19, 2014 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.