Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

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

Closed
tamkiendinh opened this issue Nov 9, 2016 · 4 comments
Closed

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

tamkiendinh opened this issue Nov 9, 2016 · 4 comments

Comments

@tamkiendinh
Copy link

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
Copy link
Owner

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:

  • BrowserPresenter.java
  • BrowserView.java
  • browser.fxml

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
Copy link
Owner

Info:
I have open a new issue in afterburner.fx for that topic: AdamBien/afterburner.fx#67

@Naoghuman
Copy link
Owner

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

@Naoghuman
Copy link
Owner

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants