Posted on 2008-12-20 01:54:23-08 by akhil
UnknownHostException : strange error messages
I am running the following line of code in my java ptogram: Parser parser = new Parser("http://www.google.com"); On executing this code I am getting an exception: Exception in thread "main" org.htmlparser.util.ParserException: The web site you seek cannot be loc +ated, but countless more e xist; java.net.UnknownHostException: www.revolutionhealth.com at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at org.htmlparser.http.ConnectionManager.openConnection(ConnectionManager.java:643) at org.htmlparser.http.ConnectionManager.openConnection(ConnectionManager.java:841) at org.htmlparser.Parser.setResource(Parser.java:398) at org.htmlparser.Parser.<init>(Parser.java:317) at org.htmlparser.Parser.<init>(Parser.java:331) at dataStructures.htmlparser.main(htmlparser.java:27) The message is different every time I execute the code like Stay the patient course. Of little worth is your ire. The page is not found ...... and many more Please help fix this error asap. Thanks
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.