I have a JavaFX application (I'm new to JavaFX) and in that application I have a WebView. There are no errors when I run the application until the webview loads the webpage. I have attempted to Google my way through the error the last three hours. I've read that the heap might not be big enough, so I allocated more memory to the VM heap. I've read that I have to specify the WebView module, which I also tried in VM arguments. I'm using IntelliJ and have no other errors in the project. The following error repeats about 10-15 times after the webpage loads in my application. No crash's, WebView appears to be functional, I just want to know why I have so many errors in my terminal when I run this application. If I need to provide anymore information please let me know, and my apologies beforehand. Using Maeven as my package manager.
ERROR
Exception in thread "JavaFX Application Thread" java.lang.NoSuchMethodError: 'com.sun.javafx.iio.ImageStorage com.sun.javafx.iio.ImageStorage.getInstance()'
at javafx.web@20-ea/com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:179)
at javafx.web@20-ea/com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:192)
at javafx.web@20-ea/com.sun.javafx.webkit.prism.WCImageDecoderImpl.addImageData(WCImageDecoderImpl.java:109)
at javafx.web@20-ea/com.sun.webkit.network.URLLoaderBase.twkDidReceiveData(Native Method)
at javafx.web@20-ea/com.sun.webkit.network.HTTP2Loader.notifyDidReceiveData(HTTP2Loader.java:566)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at javafx.web@20-ea/com.sun.webkit.network.HTTP2Loader.lambda$didReceiveData$17(HTTP2Loader.java:549)
at javafx.web@20-ea/com.sun.webkit.network.HTTP2Loader.lambda$callBackIfNotCanceled$10(HTTP2Loader.java:441)
at javafx.graphics@18.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics@18.0.1/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at javafx.graphics@18.0.1/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics@18.0.1/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@18.0.1/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:833)
LoginApplication Class
public class LoginApplication extends Application {
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(LoginApplication.class.getResource("Login.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 1440, 900);
stage.setTitle("Login");
stage.setResizable(false);
//Humble urself
stage.setHeight(600);
stage.setWidth(1000);
stage.setScene(scene);
stage.show();
Repository repo = new Repository();
}
LoginController Class
public class LoginController implements Initializable {
@FXML
private Label welcomeText;
@FXML
private TextField txtUsername;
@FXML
private TextField txtPassword;
@FXML
private Button btnLogin;
@FXML
private WebView webViewNews;
@FXML
private Button btnCreateAccount;
@FXML
private Text txtPrompt;
private WebEngine webEngine;
@FXML
protected void onLoginClicked() throws SQLException {
Repository repo = new Repository();
if(txtUsername.getText() != "") {
if(txtPassword.getText() != "") {
//Stop user input while query is processed
btnLogin.setDisable(true);
btnCreateAccount.setDisable(true);
txtPrompt.setText("Checking credentials... please wait.");
//Check query and do stuff...
if(repo.authenticateUser(txtUsername.getText(), txtPassword.getText())) {
txtPrompt.setText("Login Success Welcome!");
txtUsername.setVisible(false);
txtPassword.setVisible(false);
btnLogin.setVisible(false);
} else {
txtPrompt.setText("Login Failed! Invalid credentials.");
btnLogin.setDisable(false);
btnCreateAccount.setDisable(false);
txtPassword.clear();
}
} else txtPrompt.setText("Password blank! Please enter a password.");
} else txtPrompt.setText("Username blank! Please enter a username.");
}
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
webEngine = webViewNews.getEngine();
webEngine.load("https://www.forums.blacksunstudios.us/index.php?pages/hideNews/");
}