You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Script Editor, open Widgets.js (template from scripting-javascript).
It has many parameter types, including:
#@ BigIntegerbigInteger
#@ BigDecimalbigDecimal
Run it, and an exception is thrown with message ClassCastException: java.lang.Double cannot be cast to java.math.BigInteger.
ClassCastException stack trace
[ERROR] Command errored: script:Widgets.js
java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigInteger
at org.scijava.ui.swing.widget.SpinnerNumberModelFactory.createModel(SpinnerNumberModelFactory.java:56)
at org.scijava.ui.swing.widget.SwingNumberWidget.set(SwingNumberWidget.java:123)
at org.scijava.ui.swing.widget.SwingNumberWidget.set(SwingNumberWidget.java:74)
at org.scijava.plugin.WrapperService.create(WrapperService.java:65)
at org.scijava.widget.AbstractInputHarvester.addInput(AbstractInputHarvester.java:110)
at org.scijava.widget.AbstractInputHarvester.buildPanel(AbstractInputHarvester.java:84)
at org.scijava.widget.InputHarvester.harvest(InputHarvester.java:67)
at org.scijava.ui.AbstractInputHarvesterPlugin.process(AbstractInputHarvesterPlugin.java:74)
at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:103)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:154)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
[ERROR] java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw exception
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.scijava.ui.swing.script.TextEditor.evalScript(TextEditor.java:3439)
at org.scijava.ui.swing.script.TextEditor.access$600(TextEditor.java:208)
at org.scijava.ui.swing.script.TextEditor$5.execute(TextEditor.java:2761)
at org.scijava.ui.swing.script.TextEditor$Executer$1.run(TextEditor.java:2526)
Caused by: java.lang.RuntimeException: Module threw exception
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:128)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigInteger
at org.scijava.ui.swing.widget.SpinnerNumberModelFactory.createModel(SpinnerNumberModelFactory.java:56)
at org.scijava.ui.swing.widget.SwingNumberWidget.set(SwingNumberWidget.java:123)
at org.scijava.ui.swing.widget.SwingNumberWidget.set(SwingNumberWidget.java:74)
at org.scijava.plugin.WrapperService.create(WrapperService.java:65)
at org.scijava.widget.AbstractInputHarvester.addInput(AbstractInputHarvester.java:110)
at org.scijava.widget.AbstractInputHarvester.buildPanel(AbstractInputHarvester.java:84)
at org.scijava.widget.InputHarvester.harvest(InputHarvester.java:67)
at org.scijava.ui.AbstractInputHarvesterPlugin.process(AbstractInputHarvesterPlugin.java:74)
at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:103)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:154)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
... 6 more
Removing these two parameters avoids the exception. But it looks like something broken either here in scijava-common, or maybe in scijava-ui-swing.
In the Script Editor, open Widgets.js (template from scripting-javascript).
It has many parameter types, including:
Run it, and an exception is thrown with message
ClassCastException: java.lang.Double cannot be cast to java.math.BigInteger
.ClassCastException stack trace
Removing these two parameters avoids the exception. But it looks like something broken either here in scijava-common, or maybe in scijava-ui-swing.
CC @hwilson23
The text was updated successfully, but these errors were encountered: