ForbiddenClassException: org.sputnikdev.bluetooth.gattparser.spec.Characteristic

I’m working on the Bluetooth binding and when I copy these files to /usr/share/openhab/addons

  • bluez-dbus-osgi-0.1.3.jar
  • org.openhab.binding.bluetooth-3.3.0-SNAPSHOT.jar
  • org.openhab.binding.bluetooth.bluez-3.3.0-SNAPSHOT.jar
  • org.openhab.binding.bluetooth.generic-3.3.0-SNAPSHOT.jar

and configure a device, I get the following exception.

When I place a breakpoint at
BluetoothGattSpecificationReader.java:417
and execute the following code there
xstream.addPermission(com.thoughtworks.xstream.security.AnyTypePermission.ANY)
it works.

Why could that be? Where there changes on that library? Thanks for help and hints.

[ERROR] [pec.BluetoothGattSpecificationReader] - Could not read file: bundleresource://272.fwk16791191/gatt/characteristic/org.bluetooth.characteristic.temperature.xml
com.thoughtworks.xstream.security.ForbiddenClassException: org.sputnikdev.bluetooth.gattparser.spec.Characteristic
	at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26) ~[?:?]
	at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74) ~[?:?]
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[?:?]
	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47) ~[?:?]
	at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) ~[?:?]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133) ~[?:?]
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[?:?]
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391) ~[?:?]
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376) ~[?:?]
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1327) ~[?:?]
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1281) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getSpec(BluetoothGattSpecificationReader.java:417) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getCharacteristic(BluetoothGattSpecificationReader.java:394) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.loadCharacteristic(BluetoothGattSpecificationReader.java:368) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getCharacteristicByUUID(BluetoothGattSpecificationReader.java:130) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.BluetoothGattParser.isKnownCharacteristic(BluetoothGattParser.java:86) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler$CharacteristicHandler.handleCharacteristicUpdate(GenericBluetoothHandler.java:355) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.onCharacteristicUpdate(GenericBluetoothHandler.java:161) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.handleServiceData(GenericBluetoothHandler.java:218) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.onScanRecordReceived(GenericBluetoothHandler.java:168) ~[?:?]
	at org.openhab.binding.bluetooth.BluetoothDevice.notifyListeners(BluetoothDevice.java:393) ~[?:?]
	at org.openhab.binding.bluetooth.BaseBluetoothDevice.notifyListeners(BaseBluetoothDevice.java:343) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.onServiceDataUpdate(BlueZBluetoothDevice.java:366) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.ServiceDataEvent.dispatch(ServiceDataEvent.java:41) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZBridgeHandler.onDBusBlueZEvent(BlueZBridgeHandler.java:221) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.BlueZEventListener.onServiceDataUpdate(BlueZEventListener.java:53) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.ServiceDataEvent.dispatch(ServiceDataEvent.java:41) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.notifyListeners(BlueZPropertiesChangedHandler.java:71) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.onServiceDataUpdate(BlueZPropertiesChangedHandler.java:222) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.lambda$1(BlueZPropertiesChangedHandler.java:121) ~[?:?]
	at java.util.Map.forEach(Map.java:661) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.lambda$0(BlueZPropertiesChangedHandler.java:91) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	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:829) [?:?]
2022-03-29 20:39:37.292 [ERROR] [ab.binding.bluetooth.BluetoothDevice] - Failed to inform listener 'org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler@f8f5c5': null
java.lang.NullPointerException: null
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.validate(BluetoothGattSpecificationReader.java:304) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.addCharacteristic(BluetoothGattSpecificationReader.java:294) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getCharacteristicByUUID(BluetoothGattSpecificationReader.java:131) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.BluetoothGattParser.isKnownCharacteristic(BluetoothGattParser.java:86) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler$CharacteristicHandler.handleCharacteristicUpdate(GenericBluetoothHandler.java:355) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.onCharacteristicUpdate(GenericBluetoothHandler.java:161) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.handleServiceData(GenericBluetoothHandler.java:218) ~[?:?]
	at org.openhab.binding.bluetooth.generic.internal.GenericBluetoothHandler.onScanRecordReceived(GenericBluetoothHandler.java:168) ~[?:?]
	at org.openhab.binding.bluetooth.BluetoothDevice.notifyListeners(BluetoothDevice.java:393) ~[?:?]
	at org.openhab.binding.bluetooth.BaseBluetoothDevice.notifyListeners(BaseBluetoothDevice.java:343) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZBluetoothDevice.onServiceDataUpdate(BlueZBluetoothDevice.java:366) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.ServiceDataEvent.dispatch(ServiceDataEvent.java:41) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZBridgeHandler.onDBusBlueZEvent(BlueZBridgeHandler.java:221) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.BlueZEventListener.onServiceDataUpdate(BlueZEventListener.java:53) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.events.ServiceDataEvent.dispatch(ServiceDataEvent.java:41) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.notifyListeners(BlueZPropertiesChangedHandler.java:71) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.onServiceDataUpdate(BlueZPropertiesChangedHandler.java:222) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.lambda$1(BlueZPropertiesChangedHandler.java:121) ~[?:?]
	at java.util.Map.forEach(Map.java:661) ~[?:?]
	at org.openhab.binding.bluetooth.bluez.internal.BlueZPropertiesChangedHandler.lambda$0(BlueZPropertiesChangedHandler.java:91) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	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:829) [?:?]