java.lang.IllegalStateException: Can not call getBody() for big content WebResponseData, use getInputStream()

htmlunit | rschwab | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    HtmlUnit / Bugs / #1047 PatternSyntaxException

    sourceforge.net | 2 years ago
    java.lang.IllegalStateException: Can not call getBody() for big content WebResponseData, use getInputStream()
  2. 0

    PatternSyntaxException

    htmlunit | 7 years ago | rschwab
    java.lang.IllegalStateException: Can not call getBody() for big content WebResponseData, use getInputStream()

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Can not call getBody() for big content WebResponseData, use getInputStream()

      at com.gargoylesoftware.htmlunit.WebResponseData.getBody()
    2. HtmlUnit
      HTMLParser$HtmlUnitDOMBuilder.endElement
      1. com.gargoylesoftware.htmlunit.WebResponseData.getBody(WebResponseData.java:182)
      2. com.gargoylesoftware.htmlunit.WebResponse.getContentAsString(WebResponse.java:200)
      3. com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1045)
      4. com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:959)
      5. com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:361)
      6. com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:223)
      7. com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:243)
      8. com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:678)
      8 frames
    3. Xerces2-j
      AbstractSAXParser.endElement
      1. org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      1 frame
    4. HtmlUnit
      HTMLParser$HtmlUnitDOMBuilder.endElement
      1. com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:636)
      1 frame
    5. Maven
      HTMLConfiguration.parse
      1. org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1136)
      2. org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1038)
      3. org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)
      4. org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)
      5. org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999)
      6. org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991)
      7. org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)
      8. org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
      9. org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
      9 frames
    6. Xerces2-j
      XMLParser.parse
      1. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      1 frame
    7. HtmlUnit
      WebClient.getPage
      1. com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:864)
      2. com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:311)
      3. com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:265)
      4. com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:138)
      5. com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:105)
      6. com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:431)
      7. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)
      8. com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:371)
      8 frames