Bluetooth binding issue on openHAB 2.5.2 Release Build running on ubuntu 18.04

Processor : Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory : 7912MB (3090MB used)
Machine Type : Desktop
Operating System : Ubuntu 18.04.4 LTS

java version
openjdk version “11.0.1” 2018-10-16 LTS
OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS)
OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)

OH version openHAB 2.5.2 Release build

I do have zwave and other device working ok. But the Bluetooth binding has a error.

"2020-03-20 06:22:25.229 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler@5e5a3849’: Cannot access BlueZ layer.
java.lang.IllegalStateException: Cannot access BlueZ layer.
at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:104) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.RuntimeException: Native library is out of date. Please update the native library.
at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:317) ~[?:?]
at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:92) ~[?:?]
… 9 more
2020-03-20 06:22:25.271 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘bluetooth:bluez:4a712fb1’: Cannot access BlueZ layer.
java.lang.IllegalStateException: Cannot access BlueZ layer.
at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:104) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.RuntimeException: Native library is out of date. Please update the native library.
at tinyb.BluetoothManager.getBluetoothManager(BluetoothManager.java:317) ~[?:?]
at org.openhab.binding.bluetooth.bluez.handler.BlueZBridgeHandler.initialize(BlueZBridgeHandler.java:92) ~[?:?]
… 9 more
"
Any suggestion to fix this ?

Thank you

If you check the prerequisits, recommended Java version is Java 8, not 11.
Please change your Java version and try again.

Thank you for the reply.
I did make changes to java and bluez version. But I still get the same error.
Here is my version info:
java:
openjdk version “1.8.0_242”
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

hcitool dev:
Devices:
hci1 00:08:CA:89:B5:F5

bluetoothd -v

5.43

I get the same error staring with"BlueZ JNI connection cannot be established."

Thank you,

Please change to Azul Java 8, not OpenJDK

Where do you get release notes for the Ubuntu releases ?
eg 2.5.2-1

I did change java version. But issue is still there.

java -version
openjdk version “1.8.0_242”
OpenJDK Runtime Environment (Zulu 8.44.0.11-CA-linux64) (build 1.8.0_242-b20)
OpenJDK 64-Bit Server VM (Zulu 8.44.0.11-CA-linux64) (build 25.242-b20, mixed mode)

bluetoothctl
[NEW] Controller 00:08:CA:89:B5:F5 homepc [default]
Agent registered

bluetoothctl -v
5.47

also change bluez to 5.47.

Really appreciate the help trying to fix this issue so far.
Thanks.

Hello,

Did you fixed it ?

Thanks

Not really. I tried so many things and I could not get it to work on Ubuntu 18.04 on a i-5 based box. Now I am trying it on Openhabian on raspberry pi. Bluetooth binding work on there.

I sincerely sympathize. I tried so many things too. Finally, I had to rebuild tinyb library to make it works. I hoped you had an less radical alternative :frowning: