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

错误提示如下

Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE

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)

版本如下(client and selenium)

(SSLConnectionSocketFactory.java:144)  httpclient-4.5.2.jar

selenium

Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE

解决流程

挂载源码 (SSLConnectionSocketFactory.java:144

@Deprecated

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。。

原因: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的更多相关文章

  1. Atitit 类库冲突 解决方案

    Atitit 类库冲突 解决方案 表现情况,找到不某些方法 类等,一个情况是真的找不到,一个情况是加载了错误的jar,导致正确的jar无法加载.. 1.1. 查找现在ide正在使用的jar1 1.2. ...

  2. 与其他Javascript类库冲突解决方案

    $(document).ready(function() { var $jq = jQuery.noConflict(); $jq('#id').show(); });

  3. Atitit 知识图谱解决方案:提供完整知识体系架构的搜索与知识结果overview

    Atitit 知识图谱解决方案:提供完整知识体系架构的搜索与知识结果overview   知识图谱的表示和在搜索中的展1 提升Google搜索效果3 1.找到最想要的信息.3 2.提供最全面的摘要.4 ...

  4. atitit.身份认证解决方案attilax总结

    atitit.身份认证解决方案attilax总结 1.1. 身份认证1 1.2.  basic认证1 1.2.1. 编程实现basic客户端2 1.3. digest认证机制3 1.4. SSL认证3 ...

  5. Atitit.并发测试解决方案(2) -----获取随机数据库记录 随机抽取数据 随机排序 原理and实现

    Atitit.并发测试解决方案(2) -----获取随机数据库记录 随机抽取数据 随机排序 1. 应用场景 1 2. 随机抽取数据原理 1 3. 常用的实现方法:::数据库随机函数 1 4. Mssq ...

  6. SVN代码提交冲突解决方案

    SVN代码提交冲突解决方案 1.若你的代码被其他人修改并提交过了,期间你自己也修改过该文件,UPDATE的时候自己代码被覆盖. 右键——>显示日志 查看该文件的更新记录 找到需恢复的版本 右键— ...

  7. Git冲突解决方案

    Git冲突解决方案 1.  在代码提交时,先更新,若有冲突.先解决冲突.若提交之后在review时才发现无法合并代码时有冲突,需要abandon此次提交的代码. 2.  解决冲突的基本做法,保存本地代 ...

  8. PC端的软件端口和adb 5037端口冲突解决方案

    引用https://www.aliyun.com/jiaocheng/32552.html 阿里云 >  教程中心   >  android教程 >  PC端的软件端口和adb 50 ...

  9. Atitit 视图参数解决方案 oracle版和mysql版本 attilax总结.docx

    Atitit 视图参数解决方案 oracle版和mysql版本 attilax总结.docx 1.1. Package机制1 1.2. 全局变量机制1 1.3. 临时表模式,oracle mysql都 ...

随机推荐

  1. 在centos上配置IP

    当我们安装好系统后,最先做的应该就是配置IP了,因为无论是要下载工具软件.还是远程链接,网络必不可少,所以我们要先来配置IP! 一.查看IP 如何在centos上查看IP呢,使用 ifconfig 命 ...

  2. 前端模板Juicer

    Juicer 是一个高效.轻量的前端 (Javascript) 模板引擎,使用 Juicer 可以是你的代码实现数据和视图模型的分离(MVC). 除此之外,它还可以在 Node.js 环境中运行. 用 ...

  3. Python发布包到Pypi

    本地打包:python setup.py sdist 上传Pypi:python setup.py register sdist upload

  4. MHA的在线切换后的一些总结(mha方案来自网络)

    mha方案来自:http://www.cnblogs.com/xuanzhi201111/p/4231412.html MHA的在线切换 192.168.2.131 [root bin]$ maste ...

  5. shell循环

    for循环 for循环一般格式为: for 变量 in 列表 do command1 command2 ... commandN done 列表是一组值(数字.字符串等)组成的序列,每个值通过空格分隔 ...

  6. TeamViewer11使用教程

    下载地址(官网):http://res.ncmem.com/download/TeamViewer11.exe 下载地址(360):https://yunpan.cn/cvxRiTfSC3iH6(访问 ...

  7. Drupal 7 安装时的数据库问题

    在安装D7时,需要用PhpMyAdmin创建数据库,不建议使用ROOT帐号而需要建立一个新的帐号.一般,建立一个新的账号,如foo,并同时建一个同名的数据库,选择localhost(如果是本地).但是 ...

  8. linux ssh config

    Host code.engineering.redhat.com    HostName code.engineering.redhat.com    Port 29418    User jiall ...

  9. 用canvas制作酷炫射击游戏--part2

    今天这一部分主要讲游戏的实现原理与游戏循环的代码实现. 先说原理,大家都看过动画吧.在我看来,游戏就是玩家能人为控制动画剧情发展方向的动画.所以,我们的游戏引擎其实说白了就是个动画引擎再加上鼠标事件. ...

  10. 在 Vagrant 下启用 SMB 文件共享

    在使用 vagrant 搭建 php 开发环境的时候,需要用到文件同步同步功能.在比对了众多网络文件系统之后,发现对 Windows 下文件同步系统最友好的是 smb, 那么怎么在 vagrant 启 ...