Hi Seb,
we implement a base project and use it as dependency for customer projects.
In the base JAR lots of views (FXML, Model, Controller, etc.) implemented. We reuse or extend the base implementations in custom projects.
The base project can run as an application too - as kind of bas/reference implementation.
If we build it with maven we get a executable jar, which can be started by double click and all is working fine.
The custom project executable Jar fails, because it cannot load for instance the Shell.fxml, which lies in the base Jar. So we get a null pointer exception like this:
2016-08-11 10:40:15,278 ERROR [JRebirthThreadPoolExecutor] - <jrebirth.concurrent.jtpError>
org.jrebirth.af.api.exception.CoreRuntimeException: <jrebirth.ui.fxml.fxmlNodeDoesntExist> values: nms/modules/shell/Shell.fxml|
at org.jrebirth.af.core.ui.fxml.FXMLUtils.loadFXML(FXMLUtils.java:128)
at org.jrebirth.af.core.ui.fxml.AbstractFXMLObjectModel.prepareView(AbstractFXMLObjectModel.java:111)
at org.jrebirth.af.core.concurrent.JRebirth.run(JRebirth.java:68)
at org.jrebirth.af.core.ui.AbstractBaseModel.ready(AbstractBaseModel.java:74)
at org.jrebirth.af.core.component.basic.AbstractComponent.setup(AbstractComponent.java:509)
at org.jrebirth.af.core.facade.AbstractFacade.retrieve(AbstractFacade.java:216)
at org.jrebirth.af.core.command.basic.showmodel.PrepareModelCommand.perform(PrepareModelCommand.java:56)
at org.jrebirth.af.core.command.AbstractBaseCommand.innerRun(AbstractBaseCommand.java:185)
at org.jrebirth.af.core.command.CommandRunnable.runInto(CommandRunnable.java:67)
at org.jrebirth.af.core.concurrent.AbstractJrbRunnable.run(AbstractJrbRunnable.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Seams, the FXMLUtils.loadFXML cannot find or have access to the path of Shell.fxml file of the external JAR.
Do you have any idea, what I can do to solve this problem? Do you have any experience using JRebirth in several JARs?
Thanks a lot in advance
Kind regards
Andreas