20180831_jar包冲突2_天安微信httpclient冲突

一、异常现象

微信项目需要向腾讯服务器发送请求获取token。

但是在请求的时候抛了个异常:

<2018-8-30 下午05时39分18秒 CST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.> 
Exception in thread "Timer-3" java.lang.NoSuchMethodError: org.apache.http.client.methods.HttpGet.setConfig(Lorg/apache/http/client/config/RequestConfig;)V
    at aurora.plugin.weixin.common.HttpHelper.doGet(HttpHelper.java:51)
    at aurora.plugin.weixin.gz.util.AuthHelper.getAccessToken(AuthHelper.java:58)
    at aurora.plugin.weixin.gz.WeiXinGZServlet$1.run(WeiXinGZServlet.java:219)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
<2018-8-30 下午05时39分18秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN> 
<2018-8-30 下午05时39分18秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING> 
<2018-8-30 下午05时39分18秒 CST> <Warning> <Server> <BEA-002611> <Hostname "localhost.default", maps to multiple IP addresses: 127.0.0.1, 192.168.133.72> 

在本地用tomcat跑时,是正常的。但是在服务器上用weblogic跑时,却报了这个异常。

本地和服务器的工程下的所有文件都一样,唯一不一样的就是sevlet容器。一个是tomcat,一个是weblogic.

二、异常原因

三.异常解决

四、参考资料

原文地址:https://www.cnblogs.com/shirui/p/9567454.html