Enocean thing removal causes NPE

I have a FAH60 sensor, which I had defined as a generic thing in a file. With the new Binding 2.5.0 M3, I want to replace it by a defined thing (and hope to be able to use also the second sensor value).
The definition has been deleted, but the thing is still in PaperUI. If I try to remove it there, I get the following error and the thing still remains.

2019-09-15 10:20:07.574 [ERROR] [core.thing.internal.ThingManagerImpl] - The ThingHandler caused an exception while handling the removal of its thing
java.lang.NullPointerException: null
	at org.openhab.binding.enocean.internal.handler.EnOceanBaseActuatorHandler.handleRemoval(EnOceanBaseActuatorHandler.java:236) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$7.run(ThingManagerImpl.java:968) [184:org.openhab.core.thing:2.5.0.M3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	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) [?:?]

How can I remove that thing from the system in order to use the auto search for that sensor again?

Stop openHAB
clear the cache
Start openHAB

Is the thing still there?

Yes, the thing was still there.

After some trials I deleted it manually in the file /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.Thing.json
That made it gone.

Well done. That was going to be my next suggestion.
Please mark the topic as solved. Thanks

It is good that you got it running again. But that is not a long term solution. I would suggest to open an issue in https://github.com/openhab/openhab2-addons/issues because I consider this to be a bug in the binding.

1 Like

Please see the following issue: