Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095497

Mac: HelloTreeTableView throws ClassCastException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: emb-8u6, 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      8u-dev, Hudson build 327
      Tested on Mac.

      Description

      Run artifacts/toys/run-controls.sh (with JAVA_HOME and JAVAFX_HOME defined per David Hill's instructions).
      The HelloTreeTableView is the second demo. It won't start. The console displays the following exception:


      java -ea -DproxyHost=www-proxy.us.oracle.com -DproxyPort=80 -cp /Users/anthony/fx/archive/artifacts/sdk/rt//lib/ext/jfxrt.jar:dist/HelloWorld.jar helloworld.HelloTreeTableView
      Exception in Application start method
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
      at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
      at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
      at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
      at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.ClassCastException: javax.swing.plaf.IconUIResource cannot be cast to javax.swing.ImageIcon
      at helloworld.HelloTreeTableView.createNode(HelloTreeTableView.java:543)
      at helloworld.HelloTreeTableView.buildFileBrowserTreeTableView(HelloTreeTableView.java:425)
      at helloworld.HelloTreeTableView.buildFileSystemBrowserTab(HelloTreeTableView.java:303)
      at helloworld.HelloTreeTableView.getContent(HelloTreeTableView.java:114)
      at helloworld.HelloTreeTableView.start(HelloTreeTableView.java:87)
      at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
      at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
      at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
      at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
      Exception running application helloworld.HelloTreeTableView

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            anthony Anthony Petrov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: