openHAB crashes due to java library for leapmotion for addon

  • Platform information:
    • Hardware: Mac Mini 2009
    • OS: Mac OSx
    • Java Runtime Environment: openjdk version “1.8.0_232”
    • openHAB version: 2.5.0.M5
  • Issue of the topic: I migrated my openHab installation from an older Mac to another Mac following the instructions. I am able to start openHAB ,but after 8-10 seconds. I get the following errors and openHAB crashes.

Native code library failed to load.

java.lang.UnsatisfiedLinkError: no tinyb in java.library.path

Native code library failed to load. 

java.lang.UnsatisfiedLinkError: no LeapJava in java.library.path

I tried uninstalling the leapmotion addon using bundle:uninstall but it was reinstalled, as this is the messages I get.


openhab> java.lang.IllegalStateException: Module has been uninstalled.                                                                                                                                                                                                                                                                                                      
	at org.eclipse.osgi.container.Module.checkValid(Module.java:536)
	at org.eclipse.osgi.container.Module.getStartLevel(Module.java:240)
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:617)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinyb in java.library.path
Native code library failed to load. 
java.lang.UnsatisfiedLinkError: no LeapJava in java.library.path

Please, help us to help you. You can start by using code fences and changing the title to something shorter and more describing.

I can have a look at the native code. But I do not understand why LeapMotion should be missing.

For tinyb you need to install bluetooth transport/binding which will ship that part. The other one LeapJava must be placed in java.library.path. For me, if I run openhab from start.sh script it is set automatically to $OPENHAB_HOME/userdata/tmp/lib. You need to copy LeapJava there. Please be aware that macos libraries use dylib extension and sometimes their loading might not work properly as most of openhab stuff is ran on linux.

Cheers,
Łukasz

LeapMotion seems to be really, really bad. It looks if the library itself is preset with a special name in the classpath. Please open an issue on github and mark it as bug/critical.

When did this last work? Which version did you use when that worked? I reverted all changes we did in the last time but I always get the same error. OTOH, I don’t have a Mac, so maybe relatred to that.