Я не понимаю, что происходит ???
У меня есть следующий код:
public static void main(String[] args){
WebClient wc = null;
HtmlPage hp = null;
ArrayList<Product> allProducts;
try{
wc = new WebClient(BrowserVersion.FIREFOX_3_6);
hp = wc.getPage("http://www.mega.co.il/");
}catch (Exception e) {
}
finally{
allProducts = getProducts(wc, hp);
for (Product product : allProducts) {
System.out.println(product);
}
}
}
и все же консоль показывает исключение javax.net.ssl.SSLPeerUnverifiedException
hp = wc.getPage ("http://www.mega.co.il/"); строка:
Aug 3, 2011 10:45:19 PM com.gargoylesoftware.htmlunit.html.BaseFrame loadInnerPageIfPossible
SEVERE: IOException when getting content for iframe: url=[http://www.mega.co.il/jsfweb/logins/rightLoginHPIframe.jsf]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:339)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:597)
at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:133)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1405)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1459)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1324)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:303)
at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPageIfPossible(BaseFrame.java:141)
at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPage(BaseFrame.java:100)
at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1763)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:204)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:436)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)
at DBSniffer.main(DBSniffer.java:107)
Может кто-нибудь объяснить мне, что происходит?
P.S
Каким-то образом приложение продолжает работать!?
Спасибо заранее,
Dan