Builder nötig ?

Bitte aktiviere JavaScript!
Wenn man URLs braucht, kann man einfach aus dem String eine URL machen, und spart sich File und URI.
Die drei lassen jeweils unterschiedliche Zeichen zu, weshalb es da zu Problemen kommen wird.


Allerdings braucht man an der Stelle keinen ClassLoader, man kann einfach den passenden Pfad übergeben.
Aus den spärlichen Informationen hier würde ich auf "queries.queries" tippen. (die properties-Datei heißt queries und liegt im Ordner queries in resources?)
 
A

Anzeige


Vielleicht hilft dir dieser Kurs hier weiter: (hier klicken)
Code:
private void loadQueryBundle() {
        try {
//            File file = new File(ressourcePath);
//            URL[] urls = { file.toURI().toURL() };
//            ClassLoader loader = new URLClassLoader(urls);
//            queryBundle = ResourceBundle.getBundle("queries", Locale.getDefault(), loader);
            String filename = "queries/queries.properties";
            InputStream input = Database.class.getClassLoader().getResourceAsStream(filename);
            prop = new Properties();
           
            prop.load(input);
        } catch (Exception ex) {
            System.out.println(ex);
        }
    }
Habe das jetzt auf deine Empfehlung hin geändert. Jetzt wird die DB nicht mehr gefunden.

Code:
Mai 05, 2018 2:54:39 AM database.Database initDatabase
SCHWERWIEGEND: null
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: am_view_finalplayerstats)
        at org.sqlite.core.DB.newSQLException(DB.java:909)
        at org.sqlite.core.DB.newSQLException(DB.java:921)
        at org.sqlite.core.DB.throwex(DB.java:886)
        at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
        at org.sqlite.core.NativeDB.prepare(NativeDB.java:127)
        at org.sqlite.core.DB.prepare(DB.java:227)
        at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:81)
        at database.Database.selectTable(Database.java:172)
        at database.Database.loadPlayer(Database.java:122)
        at database.Database.initDatabase(Database.java:67)
        at database.Database.getInstanz(Database.java:53)
        at mainController.Match_Controller.initialize(Match_Controller.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
        at javafx.fxml.FXMLLoader.access$2700(FXMLLoader.java:103)
        at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1143)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:746)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
        at matchMakerMain.MatchMaker_Main.start(MatchMaker_Main.java:22)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
        at java.lang.Thread.run(Unknown Source)

org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: am_view_finalplayerstats)
        at org.sqlite.core.DB.newSQLException(DB.java:909)
        at org.sqlite.core.DB.newSQLException(DB.java:921)
        at org.sqlite.core.DB.throwex(DB.java:886)
        at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
        at org.sqlite.core.NativeDB.prepare(NativeDB.java:127)
        at org.sqlite.core.DB.prepare(DB.java:227)
        at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:81)
        at database.Database.selectTable(Database.java:172)
        at database.Database.loadPlayer(Database.java:122)
        at database.Database.initDatabase(Database.java:67)
        at database.Database.getInstanz(Database.java:53)
        at mainController.Match_Controller.initialize(Match_Controller.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
        at javafx.fxml.FXMLLoader.access$2700(FXMLLoader.java:103)
        at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1143)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:746)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
        at matchMakerMain.MatchMaker_Main.start(MatchMaker_Main.java:22)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
        at java.lang.Thread.run(Unknown Source)
Exception in Application start method
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: 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$154(LauncherImpl.java:182)
        at java.lang.Thread.run(Unknown Source)
Caused by: javafx.fxml.LoadException:
file:/C:/Users/marco/Desktop/Test.jar!/matchMakerView/MatchMaker_MainScene.fxml

        at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2571)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
        at matchMakerMain.MatchMaker_Main.start(MatchMaker_Main.java:22)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
        ... 1 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
        ... 12 more
Caused by: java.lang.NullPointerException
        at mainController.TreeView_Controller.createTreeViewChilds(TreeView_Controller.java:50)
        at mainController.TreeView_Controller.<init>(TreeView_Controller.java:26)
        at mainController.Main_Controller.initialize(Main_Controller.java:33)
        ... 22 more
Exception running application matchMakerMain.MatchMaker_Main
 
Dann gibt es wohl diese Tabelle nicht... was soll man denn sonst dazu sagen?
Der Inhalt der DB wurde beim Exportieren nicht kopiert, warum auch immer. Hätte gestern Nacht darauf wetten können dass es nicht an der Tabelle liegt...Dachte mit SQL Error findet er die DB nicht.
Jedenfalls klappt es jetzt, das Programm kann jetzt gestartet werden.

Wie kann ich denn jetzt bewerkstelligen dass die externen Libs mit auf Github/Gitlab landen?

Ich danke dir vielmals dass du bis in die Puppen gestern, dir die Zeit und GEDULD genommen hast mir zu helfen.
 
Wie kann ich denn jetzt bewerkstelligen dass die externen Libs mit auf Github/Gitlab landen?
Dafür würde man üblicherweise ein Build-Management-Tool wie Maven oder Gradle nutzen, damit sie eben nicht im eigene Repo landen müssen.

Wenn man das nicht will: jars mit ins Repo und adden.
 
Passende Stellenanzeigen aus deiner Region:

Neue Themen

Oben