4Quant / ImgLib2-Notebooks

Scala Notebooks showing off ImgLib2
2 stars 1 forks source link

REPL Classes cannot have noargs constructors #2

Closed kmader closed 8 years ago

kmader commented 8 years ago

Since the classes are compiled as subclasses they are forced to have a first argument and cannot be initiated with an empty list <init>()

Detailed error below, information in Create Ops notebook

[ERROR] Cannot create module: cmd2$$user$MyOps$Ramp
org.scijava.module.ModuleException: org.scijava.InstantiableException: java.lang.InstantiationException: cmd2$$user$MyOps$Ramp
Caused by: java.lang.InstantiationException: cmd2$$user$MyOps$Ramp
    at java.lang.Class.newInstance(Class.java:427)
    at org.scijava.plugin.PluginInfo.createInstance(PluginInfo.java:302)
    ... 75 more
Caused by: java.lang.NoSuchMethodException: cmd2$$user$MyOps$Ramp.<init>()
    at java.lang.Class.getConstructor0(Class.java:3082)
    at java.lang.Class.newInstance(Class.java:412)
    ... 76 more
kmader commented 8 years ago

Problem fixed in https://github.com/alexarchambault/jupyter-scala/issues/43