HTMLUnit和Java:NoSuchMethodException:createDefaultSSLContext() [英] HTMLUnit and Java: NoSuchMethodException: createDefaultSSLContext()

查看:84
本文介绍了HTMLUnit和Java:NoSuchMethodException:createDefaultSSLContext()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个HTMLUnit项目,每次尝试构建它时,都会出现以下错误: Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext().我试图寻找一种解决方案,但建议的方法对我而言并不正确.我正在使用的JVM是Java SE 6 (MacOS X Default),甚至将编译器级别从1.6更改为1.7或1.5也无法解决问题.我100%确信该程序可以在其他计算机上运行,​​但是我无法访问其JVM进行检查.对解决问题有任何想法吗?

I have this HTMLUnit project and every time I try to build it it gives the following error: Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(). I tried to search for a solution but the proposed approaches don't look right to me. The JVM I'm using is Java SE 6 (MacOS X Default) and even changing the compiler level from 1.6 to 1.7 or 1.5 doesn't solve the problem. I'm 100% sure the program runs on other machines, but I can't access their JVM to check. Do any idea on how to solve the issue?

非常感谢

推荐答案

显然,问题不在运行时的JVM或Apache jar中.我下载了最新版本的HTMLUnit,这似乎可以解决该问题.希望有人遇到过或曾经遇到过同样的问题,可以解决此问题.

Apparently the problem was neither in the JVM nor in the Apache jar at runtime. I downloaded a more recent version of HTMLUnit and this seemed to fix the problem. Hopefully if somebody has or had had the same problem, this can fix it.

这篇关于HTMLUnit和Java:NoSuchMethodException:createDefaultSSLContext()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆