java.lang.ClassCastException

com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement

Solutions on the web19027

  • via htmlunit by sirstrahd
    , 9 months ago
    com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement
  • com.gargoylesoftware.htmlunit.svg.SvgText cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement
  • com.gargoylesoftware.htmlunit.javascript.host.html.HTMLInputElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement
  • Stack trace

    • java.lang.ClassCastException: com.gargoylesoftware.htmlunit.svg.SvgElement cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlElement at com.gargoylesoftware.htmlunit.html.HtmlPage.getDocumentElement(HtmlPage.java:328) at com.gargoylesoftware.htmlunit.html.HtmlPage.getBody(HtmlPage.java:336) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElement(HTMLParser.java:548) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElement(HTMLParser.java:511) at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1203) at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.startElement(HTMLTagBalancer.java:783) at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.startElement(DefaultFilter.java:137) at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.startElement(NamespaceBinder.java:286) at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2772) at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2117) at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument(HTMLScanner.java:927) at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:506) at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:459) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:979) at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:241) at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:187) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:269) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:157) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:512) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:386) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:304) at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPageIfPossible(BaseFrameElement.java:184) at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPage(BaseFrameElement.java:122) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1818) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:226) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:519) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:386) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:304) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:468) at com.iccenter.integrationtest.tools.HtmlUnitRunner.browser_getPage(HtmlUnitRunner.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.