Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Missing classes on bot store.

Joined
Sep 21, 2015
Messages
22
Code:
javafx.fxml.LoadException:
unknown path:15

        at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
        at javafx.fxml.FXMLLoader.access$700(FXMLLoader.java:103)
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:922)
        at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971)
        at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2425)
        at com.nullstring.craftyminer.CraftyMiner.botInterfaceProperty(rm.entrypoint:88)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.nullstring.craftyminer.ui.MineFXController
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:920)
        ... 11 more

It appears my MineFXController class isn't being distributed from the bot store, my manifest is below.

Code:
<manifest>
    <main-class>com.nullstring.craftyminer.CraftyMiner</main-class>
    <name>CraftyMiner</name>
    <tag-line>Crafting Guild Miner</tag-line>
    <description>Mines ore in the Crafting Guild</description>
    <version>1.0.5</version>
    <compatibility>
        <game-type>RS3</game-type>
    </compatibility>
    <categories>
        <category>Mining</category>
    </categories>
    <!--Required to publish on the bot store -->
    <internal-id>CraftyMiner</internal-id>
    <open-source>true</open-source>
    <resources>
        <resource>com/nullstring/craftyminer/ui/MineGUI.fxml</resource>
    </resources>
</manifest>

Does anyone know what could be causing this? My local SDK version loads correctly.
 
Go check out new bots and give helpful feedback.
Joined
Jan 31, 2016
Messages
5,413
Code:
javafx.fxml.LoadException:
unknown path:15

        at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
        at javafx.fxml.FXMLLoader.access$700(FXMLLoader.java:103)
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:922)
        at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971)
        at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2425)
        at com.nullstring.craftyminer.CraftyMiner.botInterfaceProperty(rm.entrypoint:88)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.nullstring.craftyminer.ui.MineFXController
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:920)
        ... 11 more

It appears my MineFXController class isn't being distributed from the bot store, my manifest is below.

Code:
<manifest>
    <main-class>com.nullstring.craftyminer.CraftyMiner</main-class>
    <name>CraftyMiner</name>
    <tag-line>Crafting Guild Miner</tag-line>
    <description>Mines ore in the Crafting Guild</description>
    <version>1.0.5</version>
    <compatibility>
        <game-type>RS3</game-type>
    </compatibility>
    <categories>
        <category>Mining</category>
    </categories>
    <!--Required to publish on the bot store -->
    <internal-id>CraftyMiner</internal-id>
    <open-source>true</open-source>
    <resources>
        <resource>com/nullstring/craftyminer/ui/MineGUI.fxml</resource>
    </resources>
</manifest>

Does anyone know what could be causing this? My local SDK version loads correctly.
Make sure the resource path is correct in the manifest. Make sure you committed the .fxml file. Not too many other things
 
Joined
Sep 21, 2015
Messages
22
Make sure the resource path is correct in the manifest. Make sure you committed the .fxml file. Not too many other things
The related FXML file is in the manifest and it's classpath is correct. Both the class and the FXML file are in the repo aswell.
 
So I've been unable to recreate this issue locally however I can confirm that the class is available as well as the fxml file.

Code:
    @Override
    public ObjectProperty<? extends Node> botInterfaceProperty() {
        if (uiProperty == null) {
            FXMLLoader loader = new FXMLLoader();
            Future<InputStream> stream = getPlatform().invokeLater(() -> Resources.getAsStream("com/nullstring/craftyminer/ui/MineGUI.fxml"));

            try {
                loader.load(stream.get());

                controller = loader.getController();
                controller.setBotInstance(this);
            } catch (IOException | InterruptedException | ExecutionException e) {
                System.err.println("Error loading GUI");
                e.printStackTrace();
            }
            uiProperty = new SimpleObjectProperty<>(loader.getRoot());
        }

        return uiProperty;
    }

This is me loading the the UI which works in the sdk but is apparently causing issues otherwise.

The related FXML file:
Code:
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.String?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<VBox id="VBox" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
      prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="com.nullstring.craftyminer.ui.MineFXController">
    <HBox prefHeight="100.0" prefWidth="200.0">
        <HBox alignment="CENTER" spacing="5.0">
            <VBox alignment="CENTER_LEFT" prefHeight="200.0" prefWidth="100.0">
                <Label alignment="TOP_LEFT" prefWidth="50.0" text="Ore:"/>
                <ComboBox fx:id="Location_ComboBox" minWidth="-Infinity" onAction="#getOre_ComboBoxEvent"
                          prefHeight="21.0" prefWidth="100.0">
                    <items>
                        <FXCollections fx:factory="observableArrayList">
                            <String fx:value="Gold ore"/>
                            <String fx:value="Clay"/>
                            <String fx:value="Silver ore"/>
                        </FXCollections>
                    </items>
                </ComboBox>
            </VBox>
        </HBox>
        <VBox prefHeight="92.0" prefWidth="446.0">
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="18.999900000002526" text="Ores Per Hour:"/>
                <Label id="" fx:id="MinePH_L" prefHeight="19.0">
                    <HBox.margin>
                        <Insets left="5.0" fx:id="x1"/>
                    </HBox.margin>
                </Label>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.0" prefWidth="78.0" text="Ores Total:"/>
                <Label id="" fx:id="OreCount_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.000091552734375" prefWidth="78.0" text="Currently:"/>
                <Label id="" fx:id="CurrentTask_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.000091552734375" prefWidth="78.0" text="Runtime:"/>
                <Label id="" fx:id="Runtime_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <padding>
                <Insets left="10.0"/>
            </padding>
        </VBox>
    </HBox>
    <TableView fx:id="ItemList_T" prefHeight="291.0" prefWidth="594.0">
        <columns>
            <TableColumn fx:id="nameColumn" prefWidth="150.0" text="Item"/>
            <TableColumn fx:id="countColumn" prefWidth="75.0" text="Count"/>
        </columns>
    </TableView>
</VBox>
 
Go check out new bots and give helpful feedback.
Joined
Jan 31, 2016
Messages
5,413
The related FXML file is in the manifest and it's classpath is correct. Both the class and the FXML file are in the repo aswell.
 
So I've been unable to recreate this issue locally however I can confirm that the class is available as well as the fxml file.

Code:
    @Override
    public ObjectProperty<? extends Node> botInterfaceProperty() {
        if (uiProperty == null) {
            FXMLLoader loader = new FXMLLoader();
            Future<InputStream> stream = getPlatform().invokeLater(() -> Resources.getAsStream("com/nullstring/craftyminer/ui/MineGUI.fxml"));

            try {
                loader.load(stream.get());

                controller = loader.getController();
                controller.setBotInstance(this);
            } catch (IOException | InterruptedException | ExecutionException e) {
                System.err.println("Error loading GUI");
                e.printStackTrace();
            }
            uiProperty = new SimpleObjectProperty<>(loader.getRoot());
        }

        return uiProperty;
    }

This is me loading the the UI which works in the sdk but is apparently causing issues otherwise.

The related FXML file:
Code:
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.String?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<VBox id="VBox" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
      prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="com.nullstring.craftyminer.ui.MineFXController">
    <HBox prefHeight="100.0" prefWidth="200.0">
        <HBox alignment="CENTER" spacing="5.0">
            <VBox alignment="CENTER_LEFT" prefHeight="200.0" prefWidth="100.0">
                <Label alignment="TOP_LEFT" prefWidth="50.0" text="Ore:"/>
                <ComboBox fx:id="Location_ComboBox" minWidth="-Infinity" onAction="#getOre_ComboBoxEvent"
                          prefHeight="21.0" prefWidth="100.0">
                    <items>
                        <FXCollections fx:factory="observableArrayList">
                            <String fx:value="Gold ore"/>
                            <String fx:value="Clay"/>
                            <String fx:value="Silver ore"/>
                        </FXCollections>
                    </items>
                </ComboBox>
            </VBox>
        </HBox>
        <VBox prefHeight="92.0" prefWidth="446.0">
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="18.999900000002526" text="Ores Per Hour:"/>
                <Label id="" fx:id="MinePH_L" prefHeight="19.0">
                    <HBox.margin>
                        <Insets left="5.0" fx:id="x1"/>
                    </HBox.margin>
                </Label>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.0" prefWidth="78.0" text="Ores Total:"/>
                <Label id="" fx:id="OreCount_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.000091552734375" prefWidth="78.0" text="Currently:"/>
                <Label id="" fx:id="CurrentTask_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <HBox prefHeight="20.0" prefWidth="200.0">
                <Label prefHeight="19.000091552734375" prefWidth="78.0" text="Runtime:"/>
                <Label id="" fx:id="Runtime_L" prefHeight="19.0" HBox.margin="$x1"/>
            </HBox>
            <padding>
                <Insets left="10.0"/>
            </padding>
        </VBox>
    </HBox>
    <TableView fx:id="ItemList_T" prefHeight="291.0" prefWidth="594.0">
        <columns>
            <TableColumn fx:id="nameColumn" prefWidth="150.0" text="Item"/>
            <TableColumn fx:id="countColumn" prefWidth="75.0" text="Count"/>
        </columns>
    </TableView>
</VBox>
Ive never done the botInterfaceProperty how you did, so I don't know.
 
Joined
Sep 21, 2015
Messages
22
Oh, I fixed this by passing in the controller manually instead of using the FXML controller declaration.
 
Top