Skip to content

ClassCastException running some demos - ArrayList to ObservableList #49

@markjfisher

Description

@markjfisher

JDK: 1.8.0_92
Gradle: 2.14
OS: Linux
groovyfx/groovy version:

compile 'org.codehaus.groovy:groovy-all:2.4.6'
compile 'org.groovyfx:groovyfx:8.0.0'

When i try to run the CanvasDemo, I get the following:

Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to javafx.collections.ObservableList
        at javafx.beans.property.ListProperty.setValue(ListProperty.java:56)
        at javafx.beans.value.WritableValue$setValue.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at groovyx.javafx.canvas.DrawOperations.setOperations(DrawOperations.groovy)
        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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2702)
        at groovy.lang.ExpandoMetaClass.setProperty(ExpandoMetaClass.java:1185)
        at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3746)
        at groovy.lang.MetaClassImpl.setProperties(MetaClassImpl.java:1746)
        at org.codehaus.groovy.runtime.callsite.ConstructorSite$NoParamSite.callConstructor(ConstructorSite.java:125)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
        at groovyx.javafx.factory.CanvasFactory.onNodeCompleted(CanvasFactory.groovy:56)

3 Other demos I've tried so far (only just started on groovyfx) are working, i.e. Accordian, Animation and HelloWorld.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions