Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFountException When loading custom component inside SceneBuilder #696

Open
Wip-Sama opened this issue Jul 30, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Wip-Sama
Copy link

When loading a component that has Ikonli inside the fxml scenebuilder refuses to load it.

Expected Behavior

Component that have FontIcon inseide fxml to work as normal fxml files

Current Behavior

All the component that have

inside an fxml does not load

Steps to Reproduce

create s imple component with Ikonli and add a FontIcon inside the fxml of the component, then try to load the compiled jar inside scenebuilder.

Your Environment

I don't really know what to say

  • latest release of scenebuilder
  • maven
  • javafx 22-ea+11
  • Ikonli 12.3.1
  • Java 22
  • maven-shade-plugin 3.6.0

Screenshots

image
image
Has you can see "ConIkonli was not loaded"

Ikonli is correctly installed don scenebuilder and maven (I use intellij)
Also if I add FontIcon inside the controller and not the fxml it works but it defeats the purpose of having the fxml in the first place.

Error

Exception for: org/wip/scenebuildernonfunctional/ConIkonli.class
javafx.fxml.LoadException:
unknown path:2

at javafx.fxml@22/javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.load(Unknown Source)
at com.oracle.javafx.scenebuilder.kit.library.util.ExplorerBase.instantiateWithFXMLLoader(ExplorerBase.java:56)
at com.oracle.javafx.scenebuilder.kit.library.util.ExplorerBase.exploreEntry(ExplorerBase.java:111)
at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.exploreEntry(JarExplorer.java:83)
at com.oracle.javafx.scenebuilder.kit.library.util.JarExplorer.explore(JarExplorer.java:65)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.exploreAndUpdateLibrary(LibraryFolderWatcher.java:381)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.runDiscovery(LibraryFolderWatcher.java:155)
at com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.run(LibraryFolderWatcher.java:100)
at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
... 13 more
Caused by: java.lang.RuntimeException: javafx.fxml.LoadException:
file:/C:/Users/sgroo/AppData/Roaming/Scene%20Builder/Library/ScenebuilderWorking-1.0-SNAPSHOT.jar!/org/wip/scenebuildernonfunctional/ConIkonli.fxml

at org.wip.scenebuildernonfunctional.ConIkonli.<init>(ConIkonli.java:19)
... 16 more

Caused by: javafx.fxml.LoadException:
file:/C:/Users/sgroo/AppData/Roaming/Scene%20Builder/Library/ScenebuilderWorking-1.0-SNAPSHOT.jar!/org/wip/scenebuildernonfunctional/ConIkonli.fxml

at javafx.fxml@22/javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.importClass(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.processImport(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.processProcessingInstruction(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.load(Unknown Source)
at org.wip.scenebuildernonfunctional.ConIkonli.<init>(ConIkonli.java:17)
... 16 more

Caused by: java.lang.ClassNotFoundException: org.kordamp.ikonli.javafx.FontIcon
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.loadTypeForPackage(Unknown Source)
at javafx.fxml@22/javafx.fxml.FXMLLoader.loadType(Unknown Source)
... 23 more

Files

Files

@Wip-Sama Wip-Sama added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant