From: Adnan <kha...@iu...> - 2013-02-22 20:34:32
|
Hi,Please check this issue.I need urjent help guys. code:public class collector implements Runnable { WebClient webClient; public AcmDataCollector() { } @Override public void run() { try { article = new Article(); webClient = new WebClient(BrowserVersion.CHROME_16); // Configuring the webClient webClient.setAjaxController(new NicelyResynchronizingAjaxController()); HtmlPage page = webClient.getPage("-----page addresss---"); System.out.println("Title :" + page.getTitleText()); webClient.waitForBackgroundJavaScriptStartingBefore(10000); webClient.closeAllWindows(); } catch (IOException ex) { Logger.getLogger(AcmDataCollector.class.getName()).log(Level.SEVERE, null, ex); } }} Running following code gives me following trace:Feb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Address family not supported by protocol family: connectFeb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: Retrying connectFeb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Address family not supported by protocol family: connectFeb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: Retrying connectFeb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Address family not supported by protocol family: connectFeb 22, 2013 2:26:19 PM org.apache.http.impl.client.DefaultRequestDirector tryConnectINFO: Retrying connectjava.net.SocketException: Address family not supported by protocol family: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127) 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 dataclass.(dataclass.java:21) at window$1.mouseDoubleClick(window.java:53) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at window.open(window.java:35) at window.main(window.java:20) -- View this message in context: http://htmlunit.10904.n7.nabble.com/java-net-SocketException-Address-family-not-supported-by-protocol-family-connect-tp30190p30194.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |
From: asashour <asa...@ya...> - 2016-05-25 08:13:22
|
You must subscribe to the list before posting. Please read http://stackoverflow.com/questions/16373906/address-family-not-supported-by-protocol-family-socketexception-on-a-specific -- View this message in context: http://htmlunit.10904.n7.nabble.com/java-net-SocketException-Address-family-not-supported-by-protocol-family-connect-tp30190p39442.html Sent from the HtmlUnit - General mailing list archive at Nabble.com. |