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?

[343 byte] By [advaitsamanta] at [2007-11-26 20:05:03]
# 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.
bshannona at 2007-7-9 23:05:50 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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.

advaitsamanta at 2007-7-9 23:05:50 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
What's your CLASSPATH set to?Are you running a standalone program or are you running it in some server?
bshannona at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Its a stand alone program.I have JDK 1.4.1_8 installed on my machine. I cross ckecked CLASSPATH. I dont think there is problem with CLASSPATH.Fact is that, i replaced these two jars it started throwing exception.
advaitsamanta at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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.
bshannona at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
Try removing activation.jar from your classpath. If your research is correct then running your application should throw ClassNotFound exceptions (or similar). If your research was incorrect then your application might even work correctly.
DrClapa at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7
Hey, that was nice input.I'll try it. Whatever is the result, here is your 2 Dukes.
advaitsamanta at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 8
Hi there,I am facing the same problem. Did you find a solution to the problem?Thanks
cosmicdeva at 2007-7-9 23:05:51 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...