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?

santhosh
  • 1,894
  • 3
  • 18
  • 23

3 Answers3

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.

Sandro
  • 1,266
  • 2
  • 13
  • 25
  • `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 '12 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.

Shehzad
  • 2,870
  • 17
  • 21
1

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

joey rohan
  • 3,505
  • 5
  • 33
  • 70
  • 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 '14 at 13:15