-
Notifications
You must be signed in to change notification settings - Fork 7
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
Failed to start build jar file - Failed to load class "org.slf4j.impl.StaticLoggerBinder" #2
Comments
What version of Raspberry Pi are you running on? |
Also, please try running this project as root -- that may solve the problem. |
Running RPi Zero W. 2017 date code, not sure of revision of board however. Running as root does launch, however it will not start as root on boot |
OK, so running as root has no problems then? Related bug: Pi4J/pi4j-v2#60 Here are my notes for how to install the USB copier project, and get it running at boot. Sorry that this is not documented yet! On the build machine:
On the Raspberry Pi:
Some steps may need to be tweaked a little, I'm not sure. Please let me know if this works. |
1 issue when loading as root manually. pi@toastdoom:~ $ sudo java -jar usb-copier-0.0.2-jar-with-dependencies.jar However this does load the display, mount drives and allows me to copy without any issues. Have since added the line to /etc.rc.local (see below): !/bin/sh -e By default this script does nothing. exit 0 sudo bash -c 'nohup java -Dpi4j.library.path=/home/pi -jar /home/pi/usb-copier-0.0.2-jar-with-dependencies.jar &' This still does not load on boot. Is it possible that the sudo bash script needs to be loaded before |
Update: Can confirm that you need to have Have since successfully booted to the usb-copier |
Yes, correct, |
Issue arrises when trying to load final compiled build on the raspberry pi
java -jar usb-copier-0.0.2-jar-with-dependencies.jar
[2021-10-02 08:54:43 625] [INFO ] Initializing Bonnet
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.ExceptionInInitializerError
at aobtk.hw.Bonnet.(Bonnet.java:106)
at aobtk.hw.Bonnet.(Bonnet.java:75)
at main.Main.main(Main.java:75)
Caused by: java.lang.RuntimeException: Could not set up digital input 4
at aobtk.hw.HWButton.(HWButton.java:65)
at aobtk.hw.HWButton.(HWButton.java:47)
... 3 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy1.create(Unknown Source)
at com.pi4j.context.Context.create(Context.java:325)
at com.pi4j.internal.IOCreator.create(IOCreator.java:58)
at com.pi4j.internal.IOCreator.create(IOCreator.java:106)
at aobtk.hw.HWButton.(HWButton.java:62)
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.pi4j.provider.impl.ProviderProxyHandler.invoke(ProviderProxyHandler.java:100)
... 9 more
Caused by: com.pi4j.library.pigpio.PiGpioException: PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed
at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:263)
at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:249)
at com.pi4j.library.pigpio.impl.PiGpioNativeImpl.gpioInitialise(PiGpioNativeImpl.java:95)
at com.pi4j.library.pigpio.PiGpio.initialize(PiGpio.java:146)
at com.pi4j.plugin.pigpio.provider.gpio.digital.PiGpioDigitalInputProviderImpl.create(PiGpioDigitalInputProviderImpl.java:60)
at com.pi4j.plugin.pigpio.provider.gpio.digital.PiGpioDigitalInputProviderImpl.create(PiGpioDigitalInputProviderImpl.java:41)
... 14 more
The text was updated successfully, but these errors were encountered: