Java Mail Problem
Code October 10th, 2004I recently upgraded my JDK to v5.0. After upgrading I was receiving the following exception when trying to send email via Java:
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport at javax.activation.MailcapCommandMap.(MailcapCommandMap.java:111)
The problem is that the new JDK j2ee.jar has an incorrect version of the class MailcapCommandMap in it.
Solution : Make sure you have the latest version of JAF (activation.jar). This jar has the correct version of MailcapCommandMap. Then delete the entire activation package from your j2ee.jar.








April 5th, 2006 at 8:16 am
HI
Remove the J2ee jar from class path.
It will work
Pandit
April 20th, 2006 at 10:34 am
Hii , I was having the same problem and it was solved when removed J2ee.jar from project and from classpath
September 20th, 2006 at 1:46 am
Removing j2ee.jar is not a solution right? What if some one needs j2ee.jar in the classpath and sending the e-mail is just another task. I guess one needs to make sure that the mail APIs are before j2ee.jar in the classpath.
June 21st, 2007 at 1:42 pm
I have the later issue the Deep mentions. I need some of the stuff in j2ee.jar, but have the email issue. If I add the activation.jar to my classpath, I get an error:
class “com.sun.activation.registries.MailcapFile”’s signer information does not match signer information of other classes in the same package
How would I get around this, or how would one go about removing the mail and activation classes from his or her j2ee.jar?