com.gargoylesoftware.htmlunit.ScriptException: Wrapped java.lang.ClassCastException: java.lang.Integer (Embedded script in file:/D:/doc/web/selfhtml/javascript/objekte/anzeige/htmlelemente_select.htm#10)

htmlunit | mwnbr | 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

    Adding options to a select with JS throws Exception

    htmlunit | 1 decade ago | mwnbr
    com.gargoylesoftware.htmlunit.ScriptException: Wrapped java.lang.ClassCastException: java.lang.Integer (Embedded script in file:/D:/doc/web/selfhtml/javascript/objekte/anzeige/htmlelemente_select.htm#10)

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Integer

      at com.gargoylesoftware.htmlunit.javascript.host.Select.jsxFunction_add()
    2. HtmlUnit
      Select.jsxFunction_add
      1. com.gargoylesoftware.htmlunit.javascript.host.Select.jsxFunction_add(Select.java:125)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    4. Rhino
      InterpretedFunction.call
      1. org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
      2. org.mozilla.javascript.FunctionObject.call(FunctionObject.java:468)
      3. org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3084)
      4. org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2250)
      5. org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:149)
      6. org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
      7. org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
      8. org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:147)
      8 frames
    5. HtmlUnit
      ClickableElement.click
      1. com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:87)
      2. com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:302)
      3. com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:733)
      4. com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:107)
      4 frames
    6. Unknown
      TestCase.testDynamicSelectBox
      1. TestCase.testDynamicSelectBox(AdminAndSecurityTestCase.java:61)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    8. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      7. junit.framework.TestSuite.runTest(TestSuite.java:208)
      8. junit.framework.TestSuite.run(TestSuite.java:203)
      8 frames
    9. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      3 frames