1

我的程序可以在任何网络(家庭)等上运行良好,但不会在我的工作域上运行。该程序登录到surveymonkey.com 并下载和Excel 电子表格。但是我的工作域似乎不喜欢我的导入语句。我猜我需要输入根证书,但我不知道该怎么做。这是我在它不起作用时得到的错误。

Warning! About to Delete Survey Results.zip & Survey Results Folder Warning!
waiting for 10 seconds...
deleting previous zip file...
no file to delete.
connecting to surveymonkey logon page...
Exception in thread "main" javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
at com.gargoylesoftware.htmlunit.HtmlUnitSSLSocketFactory.connectSocket(HtmlUnitSSLSocketFactory.java:171)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:171)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1484)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1402)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:304)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:373)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:358)
at surveymonkeytest.Surveymonkeytest.main(Surveymonkeytest.java:107)
4

1 回答 1

0

工作 jdk 在 cacerts 文件中是否具有与家庭 jdk 相同的证书?如果没有,您必须从远程站点下载证书(在 firefox 中查看页面信息、安全表、查看证书、详细信息、证书层次结构、导出),然后 keytool 将其导入您正在运行的 jdk您的申请来自。

于 2013-03-01T15:26:30.167 回答