# openHAB crashes due to java library for leapmotion for addon

**URL:** <https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942>\
**Category:** Installation\
**Tags:** openhab2-addons, openhab2\
**Created:** [December 5, 2019, 3:13am UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942 "2019-12-05T03:13:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adalisan](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@adalisan](https://community.openhab.org/u/adalisan)\
**Post date:** [December 5, 2019, 3:13am UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/1 "2019-12-05T03:13:23Z")

</div>

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

```auto

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.

```auto

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

```

---

<div class="post-metadata">

**Author:** ![gitMiguel](https://community.openhab.org/user_avatar/community.openhab.org/gitmiguel/32/12476_2.png) [@gitMiguel](https://community.openhab.org/u/gitMiguel)\
**Post date:** [December 5, 2019, 3:33am UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/2 "2019-12-05T03:33:04Z")

</div>

Please, [help us to help you](https://community.openhab.org/t/how-to-ask-a-good-question-help-us-help-you/58396). You can start by using code fences and changing the title to something shorter and more describing.

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [December 5, 2019, 5:49am UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/3 "2019-12-05T05:49:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![splatch](https://community.openhab.org/user_avatar/community.openhab.org/splatch/32/33925_2.png) [@splatch](https://community.openhab.org/u/splatch)\
**Post date:** [December 5, 2019, 2:36pm UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/4 "2019-12-05T14:36:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [December 6, 2019, 4:52pm UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/5 "2019-12-06T16:52:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [December 8, 2019, 12:43pm UTC](https://community.openhab.org/t/openhab-crashes-due-to-java-library-for-leapmotion-for-addon/86942/6 "2019-12-08T12:43:39Z")

</div>

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.
