解决Weblogic中使用webservice时发生的java.lang.LinkageError
异常描述:使用axis客户端代码,部署都Weblogic环境下,调用服务端方法时打印出如下异常
resource "/bss/jsp/workflow/tasklist/waitedTask.jsp".>
Exception in thread "Thread-17" java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.axis.MessageContext.getMessage()Ljavax/xml/soap/SOAPMessage;" the class loader
(instance of weblogic/utils/classloaders/Change AwareClassLoader) of the current class, org/apache/axis/MessageContext, and the class loader
(instance of sun/misc/Launcher$AppClassLoader) for interface javax/xml/rpc/handler/soap/SOAPMessageContext
have different Class objects for the type javax/xml/soap/SOAPMessage used in the signature
at org.apache.axis.AxisFault.setFaultCodeAsString(AxisFault.java:422)
at org.apache.axis.AxisFault.<init>(AxisFault.java:228)
...
....
at java.lang.Thread.run(Thread.java:619)
异常解决:检查项目是加载的lib,把saaj.jar删除。
异常原因:可能是项目的JAR包与WEBLOGIC自带的JAR冲突。