This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes SHA1 digest error for javax/mail/MessagingException  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "SHA1 digest error for javax/mail/MessagingException  " Watch "SHA1 digest error for javax/mail/MessagingException  " New topic
Author

SHA1 digest error for javax/mail/MessagingException

Arun Kumar Gaddam
Ranch Hand

Joined: May 05, 2007
Posts: 58
java.lang.SecurityException: SHA1 digest error for javax/mail/MessagingException.class
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:194)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:201)
at java.util.jar.JarVerifier.update(JarVerifier.java:188)
at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:411)
at sun.misc.Resource.getBytes(Resource.java:97)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:256)
at java.net.URLClassLoader.access$000(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:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"


What could be the problem for this Exception ???

Thanks and Regards.
Seamus Minogue
Ranch Hand

Joined: Jun 24, 2008
Posts: 41
can you post the code which is causing it?

Could be a problem with your implementation.
Arun Kumar Gaddam
Ranch Hand

Joined: May 05, 2007
Posts: 58
here is the code..........

[edit]Add code tags. CR[/edit]
[ July 04, 2008: Message edited by: Campbell Ritchie ]
Seamus Minogue
Ranch Hand

Joined: Jun 24, 2008
Posts: 41
Nothing is really jumping out at me as the problem. Of course I have never tried sending mail using TLS authentication so its possible that the problem is coming from there.

http://blogs.sun.com/apanicker/entry/java_code_for_smtp_server

Here is a little snippet of code which looks promising. Perhaps by running them side by side you will have some luck in finding your problem.

Just looking at it the only thing that really comes to mind is that the items you are putting in your props object are different than the example. It looks like you are not specifying mail.smtp.starttls.enable to be true.

Anyway hope this helps. If not someone else on here has probably done a send mail application using TLS and might be able to point out the exact problem where I cannot.

Good Luck
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18712
    
    8

That looks a lot more complicated than the example in the JavaMail FAQ. Are you sure all those properties are really necessary?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Originally posted by Paul Clapham:
That looks a lot more complicated than the example in the JavaMail FAQ. Are you sure all those properties are really necessary?
Also, as I suspected earlier, more complicated than a beginner's question. We have another forum where Java mail is discussed, so I think I ought to move you there . . .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SHA1 digest error for javax/mail/MessagingException