3

When I tried repacking all the jars into one jar, and run that one big jar, I got following exception

java.lang.SecurityException: no manifiest section for signature file entry javax/activation/MimeType.class

After googling I found a working solution at http://www.coderanch.com/t/133070/Security/Jar-File-java-lang-SecurityException

The solution is delete SUN_MICR.RSA and SUN_MICR.SF files from the META-INF folder in the jar. It worked.

I tried to find out

how does this solution work?

. But did not find any answer.

So experts, please help me understand what goes on behind the scene.

Drigs
  • 69
  • 6
  • 1
    +1 I just came here from the page you linked to, thinking someone at stack exchange must have explained how this works by now... I guess not. – Weezle Aug 10 '12 at 19:18
  • Thanks for posting the solution, even if it's not the ideal one, it's good enough for development and debugging purposes. – isapir Aug 31 '16 at 06:26

2 Answers2

2

Another workaround, which will allow the use of jar building applications without needing some other script, is the following:

•unzip activation.jar (it should be in your classpath since mail.jar needs it)

•open META_INF/MANIFEST.MF

•Copy paste all the lines that look like

Name: javax/activation/MimeTypeParseException.class
SHA1-Digest: uxV3qLHRu5JTOFrHnJXm13AO+0M=

into your program/jar's manifeqt.

Tada ! it works as expected.

0

Check, there must be another jar file having activation.jar, causing conflict.

Amit S
  • 151
  • 9