java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1$_L1822$_L1836(<eval>:1852) at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)


Solutions on the web

Solution icon of github
via GitHub by maxg
, 8 months ago
java.lang.Double cannot be cast to java.lang.Integer at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1$_L1822$_L1836(<eval>:1852) at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)

Solution icon of stackoverflow
java.lang.Integer cannot be cast to java.lang.Long at jdk.nashorn.internal.scripts.Script$1$\^eval\_.:program(<eval>:1)

Stack trace

java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
    at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1$_L1822$_L1836(<eval>:1852)
    at jdk.nashorn.internal.scripts.Script$\^eval\_.runScript(<eval>:1)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:498)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:206)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:546)
Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
    at eclipseonut.ShareDoc$$Lambda$24/846757358.accept(Unknown Source)
    at jdk.nashorn.internal.scripts.Script$\^eval\_._L1$_L48(<eval>:59)
    at jdk.nashorn.internal.scripts.Script$\^eval\_$3._L1$_L1329(<eval>:1400)
    at jdk.nashorn.internal.scripts.Script$\^eval\_$3._L1$_L983(<eval>:1087)
    at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1$_L1881(<eval>:1938)
    at jdk.nashorn.internal.scripts.Script$\^eval\_$4._L1$_L1822$_L1836(<eval>:1847)
	... 4 more

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.