java.lang.IllegalStateException: Expected exactly one body tag but found [2] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeBodyOnLoadHandlerIfNeeded(HtmlPage.java:979) at com.gargoylesoftware.htmlunit.html.HtmlPage.<init>(HtmlPage.java:98) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:45) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:319) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:198) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:162) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:88)

htmlunit | bobanoba | 1 decade 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

    JS Error Follow Up

    htmlunit | 1 decade ago | bobanoba
    java.lang.IllegalStateException: Expected exactly one body tag but found [2] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeBodyOnLoadHandlerIfNeeded(HtmlPage.java:979) at com.gargoylesoftware.htmlunit.html.HtmlPage.<init>(HtmlPage.java:98) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:45) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:319) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:198) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:162) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:88)

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Expected exactly one body tag but found [2] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeBodyOnLoadHandlerIfNeeded(HtmlPage.java:979) at com.gargoylesoftware.htmlunit.html.HtmlPage.<init>(HtmlPage.java:98) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:45) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:319) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:198) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:162) at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:88)

      at CorrectLoginLogout2.main()
    2. Unknown
      CorrectLoginLogout2.main
      1. CorrectLoginLogout2.main(CorrectLoginLogout2.java:53)
      1 frame