htmlunit eofexception
Posted
by ihtram
on Stack Overflow
See other posts from Stack Overflow
or by ihtram
Published on 2010-06-11T09:47:10Z
Indexed on
2010/06/11
9:52 UTC
Read the original article
Hit count: 771
htmlunit
hi, i am using htmlunit to parse a page. but when i tried to get page from url i got an exception, lets have a look on my code:
WebClient wc = new WebClient(BrowserVersion.FIREFOX_3); HtmlPage page = wc.getPage(strUrl);
when compilet goes to wc.getPage(strUrl) it throws an exception i.e.
java.io.EOFException at java.util.zip.GZIPInputStream.readUByte(Unknown Source) at java.util.zip.GZIPInputStream.readUShort(Unknown Source) at java.util.zip.GZIPInputStream.readHeader(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at java.util.zip.GZIPInputStream.(Unknown Source) at com.gargoylesoftware.htmlunit.WebResponseData.getBody(WebResponseData.java:129) at com.gargoylesoftware.htmlunit.WebResponseData.(WebResponseData.java:87) at com.gargoylesoftware.htmlunit.HttpWebConnection.newWebResponseDataInstance(HttpWebConnection.java:452) at com.gargoylesoftware.htmlunit.HttpWebConnection.makeWebResponse(HttpWebConnection.java:432) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:104) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1407) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1340) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:299) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:360) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:345) at com.htmlunit.test.IHGHotelTest.main(IHGHotelTest.java:39)
any one have an idea about it
© Stack Overflow or respective owner