Hi All,
I am working on a EAR Project which is used to process mail box and do further processing.
I am using mail-1.4.7 jar . I have tested my code by running it as a stand alone program. It worked without any issues.
After then I added the piece of code in my EAR project, then i started getting below exception when i try to connect to my Mail store.
I know for a fact that why this error is occuring. My EAR Project has WAS 6.1 server library and inside the server library we have one jar named j2ee.jar which also has outdated javamail API.
So while runtime instead of loading my mail-1.4.7 jar, the JVM is loading this server jar and as a result it throws the above error.
Unfortunately I cannot remove the WAS 6.1 library from class path as other components are dependent on it.
I tried adding my JAR to WAR - Libraries but it did not resolve the issue. Dont know how to proceed.
Please throw some light on it.
the statement in my Code where the exception is thrown for Reference .
Build path is below
Build Path