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

javafx.scene.control.Control loadSkinClass Failed to load skin (while running on Linux - OpenSuse 12.1)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 7u6
    • fx2.1
    • javafx
    • OS: OpenSuse (Linux version 3.1.10-1.9-desktop running on i386)
      JavaFX: javafx-sdk2.1.0
      Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
      IDE:NetBeans 7.1.2 (Build 201204101705)

      I am getting runtime error while running a JavaFX application developed using IDE Netbeans on Linux (OpenSuse 12.1).

      The "Hello World" application is built without any error. However, if I run (from Netbeans), it gives me an output which only shows the frame (stage in JavaFX term ?), no buttons, as attached (HelloWorld.jpg).

      It throws the following error:
      [code]
      compile:
      Detected JavaFX Ant API version 1.1
      Launching <fx:jar> task from /usr/lib/jvm/javafx-sdk2.1.0/lib/ant-javafx.jar
      Launching <fx:deploy> task from /usr/lib/jvm/javafx-sdk2.1.0/lib/ant-javafx.jar
      Skip jar copy to itself: MyJavaFX.jar
      jfx-deployment:
      jar:
      run:
      SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: Button[id=null, styleClass=button], name: skinClassName, value: com.sun.javafx.scene.control.skin.ButtonSkin]' for control Button[id=null, styleClass=button]
      java.lang.NullPointerException
         at com.sun.javafx.font.FontConfigManager.populateMapsNative(Native Method)
         at com.sun.javafx.font.FontConfigManager.populateMaps(FontConfigManager.java:228)
         at com.sun.t2k.T2KFontFactory.getFullNameToFileMap(T2KFontFactory.java:1407)
         at com.sun.t2k.T2KFontFactory.getFontResource(T2KFontFactory.java:400)
         at com.sun.t2k.LogicalFont.getSlot0Resource(LogicalFont.java:187)
         at com.sun.t2k.LogicalFont.getSlotResource(LogicalFont.java:228)
         at com.sun.t2k.CompositeStrike.getStrikeSlot(CompositeStrike.java:91)
         at com.sun.t2k.CompositeStrike.getMetrics(CompositeStrike.java:137)
         at com.sun.javafx.font.PrismFontUtils.getFontMetrics(PrismFontUtils.java:31)
         at com.sun.javafx.font.PrismFontLoader.getFontMetrics(PrismFontLoader.java:439)
         at javafx.scene.text.Text.<init>(Text.java:129)
         at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java:30)
         at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java:128)
         at com.sun.javafx.scene.control.skin.ButtonSkin.<init>(ButtonSkin.java:46)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
         at javafx.scene.control.Control.loadSkinClass(Control.java:999)
         at javafx.scene.control.Control.access$500(Control.java:74)
         at javafx.scene.control.Control$12.invalidated(Control.java:918)
         at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
         at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
         at com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
         at javafx.scene.control.Control$12.set(Control.java:910)
         at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
         at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
         at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:62)
         at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:807)
         at javafx.scene.Node.impl_processCSS(Node.java:6476)
         at javafx.scene.Parent.impl_processCSS(Parent.java:1127)
         at javafx.scene.control.Control.impl_processCSS(Control.java:1109)
         at javafx.scene.Parent.impl_processCSS(Parent.java:1134)
         at javafx.scene.Node.processCSS(Node.java:6444)
         at javafx.scene.Scene.doCSSPass(Scene.java:422)
         at javafx.scene.Scene.preferredSize(Scene.java:1210)
         at javafx.scene.Scene.impl_preferredSize(Scene.java:1260)
         at javafx.stage.Window.adjustSize(Window.java:185)
         at javafx.stage.Window.access$1000(Window.java:72)
         at javafx.stage.Window$10.invalidated(Window.java:707)
         at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:129)
         at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:163)
         at javafx.stage.Window.setShowing(Window.java:768)
         at javafx.stage.Window.show(Window.java:783)
         at javafx.stage.Stage.show(Stage.java:207)
         at myjavafx.MyJavaFX.start(MyJavaFX.java:44)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:315)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:174)
         at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:141)
         at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
         at com.sun.glass.ui.gtk.GtkApplication$2$1.run(GtkApplication.java:79)
         at java.lang.Thread.run(Thread.java:722)
       
      SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for Button[id=null, styleClass=button]
      [/code]

      The source code is:
      [code]
      /*
       * To change this template, choose Tools | Templates
       * and open the template in the editor.
       */
      package myjavafx;
       
      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;
       
      /**
       *
       * @author jrahman
       */
      public class MyJavaFX extends Application {
       
          /**
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("Hello World!");
              Button btn = new Button();
              btn.setText("Say 'Hello World'");
              btn.setOnAction(new EventHandler<ActionEvent>() {
       
                  @Override
                  public void handle(ActionEvent event) {
                      System.out.println("Hello World!");
                  }
              });
              
              StackPane root = new StackPane();
              root.getChildren().add(btn);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }
      }
      [/code]

            prr Philip Race
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: