Security Exception with JavaMail 1.4 and JAF1.1
We are upgrading product to use latest JavaMail and JAF.
I am getting security exception with following message.
java.lang.SecurityException: class "com.sun.activation.registries.MailcapFile"'s signer information does not match signer information of other classes in the same package.
Has anybody faced similar issue?
# 1
I think that can occur if you have more than one copy of activation.jar in yourCLASSPATH. Also, if you're running on JDK 1.6, note that JAF is includedin JDK 1.6.
# 2
Thanks for replying.
I am using JDK 1.4
Prior to upgrading, we were using JavaMail 1.1.3 anf JAF 1.0.
I replaced mail and activation jar in CLASSPATH with the the latest respective release, it is throwing security exception.
I varified that the no other copy of activation.jar (or even mail.jar) is in CLASSPATH. Even googling gave me same thoughts that there must be multiple copies of this jars in classpath.
Another interesting thing is when i copy this jars in jre/lib/ext directory, it works fine.
I am still stuck because I dont want to copy jars in ext directory.
# 5
Well, again, my advice is to double check everything on your CLASSPATH tomake sure the javax.activation.* classes are only in the one activation.jar.Other than that, I'm out of ideas.