Java Mail Problem
I 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.
Categories: Code
HI
Remove the J2ee jar from class path.
It will work
Pandit
Hii , I was having the same problem and it was solved when removed J2ee.jar from project and from classpath
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.
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?