Atitit 类库冲突解决方案 httpclient-4.5.2.jar
2016-10-18 23:54
246 查看
Atitit 类库冲突解决方案 httpclient-4.5.2.jar
错误提示如下1
版本如下(client and selenium)2
解决流程2
挂载源码 (SSLConnectionSocketFactory.java:1442
原因:SSLConnectionSocketFactory调取AllowAllHostnameVerifier 的时候,调取了另外一个jar里面的allowAhnVer这个class3
解决: 把4.5jar放在前面运行,让它先加载。。或者使用代码预先加载4.5jar包里面的jar。。3
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:65)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:234)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:211)
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:88)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:62)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:57)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at com.attilax.net.httpTest.main(httpTest.java:18)
selenium
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
= AllowAllHostnameVerifier.INSTANCE;
Org.apache.http.conn.ssl。AllowAllHostnameVerifier
public class AllowAllHostnameVerifier extends AbstractVerifier {
public static final AllowAllHostnameVerifier INSTANCE = new AllowAllHostnameVerifier();
这个AllowAllHostnameVerifier 就在client4.5.2 jar里面啊,也有这个INSTANCE 属性的。。
我猜想可能,SSLConnectionSocketFactory调取AllowAllHostnameVerifier 的时候,调取了另外一个jar里面的allowAhnVer这个class
使用jar包搜索工具,果然搜索到client4.1 这个jar。。
作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 )
汉字名:艾提拉(艾龙), EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
Atiend
错误提示如下1
版本如下(client and selenium)2
解决流程2
挂载源码 (SSLConnectionSocketFactory.java:1442
原因:SSLConnectionSocketFactory调取AllowAllHostnameVerifier 的时候,调取了另外一个jar里面的allowAhnVer这个class3
解决: 把4.5jar放在前面运行,让它先加载。。或者使用代码预先加载4.5jar包里面的jar。。3
错误提示如下
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCEat org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:65)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:234)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:211)
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:88)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:62)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:57)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at com.attilax.net.httpTest.main(httpTest.java:18)
版本如下(client and selenium)
(SSLConnectionSocketFactory.java:144) httpclient-4.5.2.jarselenium
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
解决流程
挂载源码 (SSLConnectionSocketFactory.java:144
@Deprecatedpublic static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
= AllowAllHostnameVerifier.INSTANCE;
Org.apache.http.conn.ssl。AllowAllHostnameVerifier
public class AllowAllHostnameVerifier extends AbstractVerifier {
public static final AllowAllHostnameVerifier INSTANCE = new AllowAllHostnameVerifier();
这个AllowAllHostnameVerifier 就在client4.5.2 jar里面啊,也有这个INSTANCE 属性的。。
我猜想可能,SSLConnectionSocketFactory调取AllowAllHostnameVerifier 的时候,调取了另外一个jar里面的allowAhnVer这个class
使用jar包搜索工具,果然搜索到client4.1 这个jar。。
原因:SSLConnectionSocketFactory调取AllowAllHostnameVerifier 的时候,调取了另外一个jar里面的allowAhnVer这个class
解决: 把4.5jar放在前面运行,让它先加载。。或者使用代码预先加载4.5jar包里面的jar。。
删除4.1d jar也可,但是可能有兼容性问题,最好还是调整jar加载优先级在bat 和 .claspath文件里面。。作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 )
汉字名:艾提拉(艾龙), EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
Atiend
相关文章推荐
- Atitit 类库冲突解决方案 httpclient-4.5.2.jar
- Atitit 类库冲突 解决方案
- Atitit 类库冲突 解决方案
- tit.Atitit. http 代理原理 atiHttpProxy 大木马 h
- Atitit.HTTP 代理原理及实现 正向代理与反向代理attilax总结
- Atitit.atijson 类库的新特性设计与实现 v3 q31
- Atitit.atijson 类库的新特性设计与实现 v3 q31
- Atitit.HTTP 代理原理及实现 正向代理与反向代理attilax总结
- Atitit. IE8.0 显示本地图片预览解决方案 img.src=本地图片路径无效的解决方案
- Atitit. servlet 与 IHttpHandler ashx listen 和HttpModule的区别与联系 原理理论 架构设计 实现机制 java php c#.net js javascript c++ python
- Atitit. IE8.0 显示本地图片预览解决方案 img.src=本地图片路径无效的解决方案
- Atitit.attilax重要案例 项目与解决方案与成果 v6 qa15
- Atitit.request http乱码的设计防止 检测与解决最近实践p825 attilax总结.doc
- Atitit 文件上传 架构设计 实现机制 解决方案 实践java php c#.net js javascript c++ python
- Atitit 文件上传 架构设计 实现机制 解决方案 实践java php c#.net js javascript c++ python
- Atitit 图像处理 halcon类库的使用 范例边缘检测 attilax总结
- Atitit 图像处理 常用8大滤镜效果 Jhlabs 图像处理类库 java常用图像处理类库
- Atitit (Sketch Filter)素描滤镜的实现 图像处理 attilax总结
- Atitit 路由器下面的网络o多个路由器配置 因为存在多个dhcp 所以,不能网有时.. 更改主要的路由路由器 88.88 这样不能ip冲突..and 外部的的dhcp 范围... 在的
- [HttpClient]HTTPClient PostMethod 中文乱码问题解决方案(2种)