Exact problem: I had an application which was running in Windows 2003 (jre 1.5) Now it has been migrated to Windows 2012 (jre 1.8) server. While doing that below exception occurs,
Caller.main: com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl cannot be cast to com.sun.xml.messaging.saaj.soap.MessageImpl
Old server use jre 1.5 and the new server use the newer 1.8. In jre 1.5 we have the saaj jars separately.
From java 6 the saaj implementation is provided in jre itself and we don’t need a separate jar for this. Because of this I get classcast exception. I want to fix this by forcing the classpath to take the saaj jars from outside instead of the one in the jre itself.