Naoghuman / NetBeansIDE-AfterburnerFX-Plugin

The NetBeansIDE-AfterburnerFX-Plugin is a NetBeans IDE plugin which supports the file generation in convention with the library afterburner.fx in a JavaFX project.
GNU General Public License v3.0
9 stars 3 forks source link

File not found, attempting with camel case cannot load file #58

Closed tamkiendinh closed 6 years ago

tamkiendinh commented 7 years ago

I have installed the plugin after maven 1.7.0 installed on NetBean and after trying the program I get the following error

   StackPane root = new StackPane();
    BrowserView browserView = new BrowserView();
    root.getChildren().add(browserView.getView());

    <dependency>
        <groupId>com.airhacks</groupId>
        <artifactId>afterburner.fx</artifactId>
        <version>1.7.0</version>
    </dependency>

File: browser.fxml not found, attempting with camel case Cannot load file Browser.fxml Stopping initialization phase... Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) 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$155(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Cannot load file Browser.fxml at com.airhacks.afterburner.views.FXMLView.getResourceCamelOrLowerCase(FXMLView.java:221) at com.airhacks.afterburner.views.FXMLView.getFXMLName(FXMLView.java:205) at com.airhacks.afterburner.views.FXMLView.(FXMLView.java:83) at com.airhacks.afterburner.views.FXMLView.(FXMLView.java:72) at net.network.browser.BrowserView.(BrowserView.java:14) at net.network.MainApp.start(MainApp.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(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$148(WinApplication.java:191) ... 1 more Exception running application net.network.MainApp

BUILD FAILURE

Total time: 5.227s Finished at: Wed Nov 09 16:35:13 ICT 2016 Final Memory: 15M/36M

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project Network: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Naoghuman commented 7 years ago

Hi tamkiendinh,

like the error said: File: browser.fxml not found, attempting with camel case Cannot load file Browser.fxml

That means in your package with the name "xy.browser" must following files as minimum:

Read more about the convention to use my plugin with the library afterburner.fx in the README.md:

The following primary files [FileName].fxml, [FileName]Presenter.java, [FileName]View.java and optional [FileName].css, [FileName].properties and configuration.properties can be created in a new wizard. One conditional is that [FileName].toLowerCase() must be equals with the last choosen package name.

Naoghuman commented 7 years ago

Info: I have open a new issue in afterburner.fx for that topic: https://github.com/AdamBien/afterburner.fx/issues/67

Naoghuman commented 7 years ago

@tamkiendinh have my suggestion work or is another reason that through the error?

Naoghuman commented 6 years ago

@tamkiendinh Meanwhile its a little time ago and I have no answer from you. I close this defect. When something don't work for you please reopen or open a new one. Thanks for your feedback.