-
Notifications
You must be signed in to change notification settings - Fork 1
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
java.lang.IllegalStateException: Could not load native libraries for TinyB #2
Comments
Hi @svagionitis, it might be that OH looks into a different folder for native libs. Could you please run this in the karaf console?
Could you please post your output here? E.g.
Make sure that you've put tinyb libs (both files) in one of those folders that specified in If that's not working, please enable DEBUG level for TnyB transport in the karaf console (you should be running the latest SNAPSHOT version of TinyB transport):
Restart your OH and capture the logs from the beginning. It should give you a better explanation (exception). Please post the result here so I could add support for your arch in the transport for everyone (or if you can you could contribute yourself, your help will be much appreciated ;) ). |
Hi @vkolotov, Thanks your reply. Next following what you requested
I can see that the tinyb libraries are located in the I enabled the DEBUG actually for the whole OH :), but here it is the specific output for the tinyb bluetooth binding (I have used the released
I have used both v0.5.0 and v0.5.1 for the tinyb libraries and I get the same error. Yes I could create a PR for this but it might take sometime because I am not so familiar with Java :). |
Hi @svagionitis , I know what's that. This error means that tinyb.jar library and native libraries are of different versions. How do you build tinyb? Just make sure you build it from the master branch: https://github.com/intel-iot-devkit/tinyb/commits/master The latest commit is intel-iot-devkit/tinyb@ac6d308 When you build tinyb lib, its build process generates a hashtag which is put into native lib and into MANIFEST.MF file of the java lib file. The tinyb binding (transport) repacks tinyb library into OSGi compatible java archive. The generated hashtag is moved into MANIFEST file of the binding here: https://github.com/sputnikdev/bluetooth-manager-tinyb/blob/629bf989c348f564b562afd3f2f78c9ffd3e59ed/src/main/resources/META-INF/MANIFEST.MF#L7 You need to make sure that this hashtag ( |
Hi @vkolotov, That was the issue, that you described above. I was building the tinyb as described in the documentation though if I build from the master with the last commit the
Now, I did a little of investigation of how to get the hashtag that you refer on your comment and I found out that if I use the following
then the cmake gives the following
Although the library version changed, to Regardless of the above, I was able to re-bundle the tinyb transport binding by changing this https://github.com/sputnikdev/bluetooth-manager-tinyb/blob/629bf989c348f564b562afd3f2f78c9ffd3e59ed/src/main/resources/META-INF/MANIFEST.MF#L7 to I believe you can close this issue. Thanks again for all your help. |
Hey guys. I encountered the same problem with yours, but I run OH2 on ubuntu 16.04. I can not solve the bug: |
Can anyone give me some advice? Thanks! |
Hi @vkolotov,
First thanks for this bluetooth tinyb transport binding. I have the following issue:
I am building a custom image for a Raspberry Pi 3 using the
aarch64
machine architecture. The java version is the followingI can run openHAB2 with no issues. I have built the tinyb library v0.5.1 for the
aarch64
architecture and put it in the/usr/lib
directoryIn the openHAB2 addons directory I have put the
org.eclipse.smarthome.binding.bluetooth-1.1.4.jar
and theorg.eclipse.smarthome.binding.bluetooth.transport.tinyb-1.1.1.jar
files. I receive the following error:The same happens when I build the bluetooth tinyb transport binding myself,
org.eclipse.smarthome.binding.bluetooth.transport.tinyb-1.1.2-SNAPSHOT.jar
with the current master (using as dependency the current master of bluetooth manager tinyb.Maybe I am missing something, I am not sure what to do next. I would appreciate a little help.
The text was updated successfully, but these errors were encountered: