No Session Configuration File

#1 · open · 7 comments

View on GitHub ↗

hyfabi

Error: ```JAVA java.io.FileNotFoundException: session_conf.json (...) at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_271] at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_271] at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_271] at java.io.FileReader.<init>(FileReader.java:72) ~[na:1.8.0_271] at de.streberpower.webuntisapi2.SessionConfiguration.fromFile(SessionConfiguration.java:27) ~[bin/:na] at de.streberpower.webuntisapi2.Main.main(Main.java:23) [bin/:na] ``` How does the session_conf.json need to look like?

Comments

FaidHD

Just create one manually like `SessionConfiguration conf = new SessionConfiguration(new WebUntisCredentials("user", "password"), "server", "school");` and save it with `conf.writeToFile(file, gson);`. Both (File and gson) can be found in Main class

verfrxssen

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/tills/OneDrive/Documents/GitHub/WebUntisAPI/lib/logback-classic-1.0.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/tills/OneDrive/Documents/GitHub/WebUntisAPI/lib/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 20:40:17.795 [main] INFO de.streberpower.webuntisapi2.Main - Program started! Exception in thread "main" java.lang.Error: Unresolved compilation problems: The import javafx cannot be resolved Color cannot be resolved to a type Color cannot be resolved to a type at de.streberpower.webuntisapi2.Session.<init>(Session.java:11) at de.streberpower.webuntisapi2.Main.main(Main.java:29) any solutions?

FaidHD

`The import javafx cannot be resolved` means, that javafx (which is needed for this project) isn't added as dependency Now you can use JDK 8 or import JavaFX manually. I imported it with maven (Dependencies can be found [here](https://mvnrepository.com/artifact/org.openjfx))

OttoWinter

Hi, tbh I don't think this library works anymore. It looks like WebUntis had some major API changes since this library was released. I no longer have access to a WebUntis account, so I can't test/maintain this lib anymore. Feel free to fork/improve it :+1:

FaidHD

Ich war überrascht, aber doch, das ganze funktioniert tatsächlich noch. Ich war auch erst skeptisch, aber das hat alles ohne Probleme funktioniert

verfrxssen

Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found i am sry guys, last thing i promise - i installed javaFX but this error won't dissappear

FaidHD

https://mvnrepository.com/artifact/org.openjfx/javafx-controls/18-ea+3 This shoud be the one you are looking for