jchambers / pushy-console

A simple GUI app for sending APNs (iOS/macOS/Safari) push notifications
MIT License
53 stars 18 forks source link

Pushy Console crashes at startup due to missing locale-specific properties file #19

Open wuttke opened 5 years ago

wuttke commented 5 years ago
C:\Users\wuttke.MEONA\git\pushy-console>java -jar target\pushy-console-0.1-SNAPSHOT.jar
Exception in thread "JavaFX Application Thread" Exception in thread "main" java.
lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$155(LauncherImpl.java:352)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(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$147(WinApplication.java:177)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.util.MissingResourceException: Can't find bundle for base name com/turo/pushy/console/pushy-console, locale de_DE
        at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at com.turo.pushy.console.PushyConsoleApplication.<clinit>(PushyConsoleApplication.java:51)
        ... 11 more
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        ... 5 more
wuttke commented 5 years ago

I was able to resolve by renaming pushy_console_en.properties to pushy_console.properties and recompile. Maybe you'd like to do this in the repo?

jchambers commented 5 years ago

I think we may need some more detail before deciding on a course of action. My guess is that English is not the preferred language configured on the machine that had this problem. Is that correct?

Thanks!

jchambers commented 5 years ago

Oops—I completely missed this line in the stack trace above:

Can't find bundle for base name com/turo/pushy/console/pushy-console, locale de_DE

So, yes, the problem is certainly that we don't have a default locale. I think your proposed solution is probably right, but let me read a little more about how language fallbacks work first.

jchambers commented 5 years ago

I'm actually having a really hard time reproducing this issue and am starting to suspect that it's Windows-specific. Will continue to investigate.

coelle commented 5 years ago

Have the same issue on macOS.

jchambers commented 5 years ago

@coelle Thanks for the additional information. I'll give it another look and see what I can figure out.

coelle commented 5 years ago

I opened a pull request: https://github.com/turo/pushy-console/pull/20

Dast1Woop commented 10 months ago

not work now!!!