A blank page when editing an Item

Hello,

I am using openHAB version: 3.1.0 Release Build, on a aspberry Pi 4B with OpenHABian (working fine since months… well… more or less :blush: )

I have found one “item” (a light) that I cannot to edit via the OH administration UI. When I try to do so, I get a blank page. Behind that page, I guess that some piece of code is executed and fails; I can indeed systematically see the “stack overflow error” message here under in the logs, after each attempt to edit the item:

2022-01-04 17:42:20.843 [ERROR] [internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request.
java.util.regex.PatternSyntaxException: Stack overflow during pattern compilation near index 0
[\w-]*
^
	at java.util.regex.Pattern.error(Pattern.java:2027) ~[?:?]
	at java.util.regex.Pattern.<init>(Pattern.java:1430) ~[?:?]
	at java.util.regex.Pattern.compile(Pattern.java:1068) ~[?:?]
	at java.util.regex.Pattern.matches(Pattern.java:1173) ~[?:?]
	at java.lang.String.matches(String.java:2024) ~[?:?]
	at org.openhab.core.common.AbstractUID.validateSegment(AbstractUID.java:97) ~[?:?]
	at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:76) ~[?:?]
	at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:59) ~[?:?]
	at org.openhab.core.thing.UID.<init>(UID.java:57) ~[?:?]
	at org.openhab.core.thing.ThingUID.<init>(ThingUID.java:139) ~[?:?]
	at org.openhab.core.thing.ChannelUID.getThingUID(ChannelUID.java:150) ~[?:?]
	at org.openhab.core.thing.internal.ThingRegistryImpl.getChannel(ThingRegistryImpl.java:80) ~[?:?]
	at org.openhab.core.thing.internal.ChannelStateDescriptionProvider.getStateDescription(ChannelStateDescriptionProvider.java:97) ~[?:?]
	at org.openhab.core.thing.internal.ChannelStateDescriptionProvider.getStateDescriptionFragment(ChannelStateDescriptionProvider.java:86) ~[?:?]
	at org.openhab.core.internal.service.StateDescriptionServiceImpl.getMergedStateDescriptionFragments(StateDescriptionServiceImpl.java:71) ~[?:?]
	at org.openhab.core.internal.service.StateDescriptionServiceImpl.getStateDescription(StateDescriptionServiceImpl.java:63) ~[?:?]
	at org.openhab.core.items.GenericItem.getStateDescription(GenericItem.java:409) ~[?:?]
	at org.openhab.core.library.items.NumberItem.getStateDescription(NumberItem.java:85) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.considerTransformation(EnrichedItemDTOMapper.java:126) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:68) ~[?:?]

The last line repeats many times.

How could I delete this “probably corrupted” item (The remove button is assumed to be on the blank page :smiley: ) ? I would like to recreate this item from scratch as it was probably messed up (most items were created for OpenHAB 1.x via text files, upgraded to OH 2 and finally imported in OH 3).

Thx in adv for your guidance !

V.

You can try to remove the item using the

  • API explorer ( Administration => DeveloperTools => API Explorer; Items; Delete Item )
  • Karaf console ( openhab:items )

If that does not work you may have a look at jsondb directory located in /var/lib/openhab/

1 Like

In MainUI the remove button is not on the item details page (which is blank) but when you see the list of all items, just click the select icon in the top right area and you can delete items without open the details

SmartSelect_20220104-192525_Chrome

1 Like

Thx a lot! I didn’t think about using the api or the console (I am not very used to that). It would do they trick for sure… But using the “selection” is the easiest solution. A shame that I never noticed this feature (I never had to bulk delete items actually). I always used the remove button at the bottom of the ‘details’ page

Many thx both for your answers

V.

[Edit] By the way, I was able to delete the item, but the delete has also generated an error ending like this:

at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:62) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:90) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:62) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:90) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:62) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:90) ~[?:?]