Skip to content
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

Missing channels since last update #2831

Closed
clinique opened this issue Mar 11, 2022 · 7 comments · Fixed by #2833
Closed

Missing channels since last update #2831

clinique opened this issue Mar 11, 2022 · 7 comments · Fixed by #2833

Comments

@clinique
Copy link
Contributor

clinique commented Mar 11, 2022

I'm on milestone 3.3.0 Build 2797, updated this morning.
Many channels have disappeared from things.
Here's an example for Telegram Bot :
image

Many bindings seems impacted (openuv, telegram, logreader, astro...) and the log is full of this error :

2022-03-11 14:28:04.392 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document '/OH-INF/thing/channels.xml' in module 'org.openhab.binding.astro' could not be parsed: ChannelType 'itemType' must not be null or empty.
---- Debugging information ----
message             : ChannelType 'itemType' must not be null or empty.
class               : org.openhab.core.thing.xml.internal.ChannelTypeXmlResult
required-type       : org.openhab.core.thing.xml.internal.ChannelTypeXmlResult
converter-type      : org.openhab.core.thing.xml.internal.ChannelTypeConverter
path                : /thing-descriptions/channel-type[10]
line number         : 126
class[1]            : java.util.ArrayList
required-type[1]    : java.util.ArrayList
converter-type[1]   : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2]            : org.openhab.core.thing.xml.internal.ThingDescriptionList
required-type[2]    : org.openhab.core.thing.xml.internal.ThingDescriptionList
converter-type[2]   : org.openhab.core.thing.xml.internal.ThingDescriptionConverter
version             : 1.4.19
-------------------------------
com.thoughtworks.xstream.converters.ConversionException: ChannelType 'itemType' must not be null or empty.
---- Debugging information ----
message             : ChannelType 'itemType' must not be null or empty.
class               : org.openhab.core.thing.xml.internal.ChannelTypeXmlResult
required-type       : org.openhab.core.thing.xml.internal.ChannelTypeXmlResult
converter-type      : org.openhab.core.thing.xml.internal.ChannelTypeConverter
path                : /thing-descriptions/channel-type[10]
line number         : 126
class[1]            : java.util.ArrayList
required-type[1]    : java.util.ArrayList
converter-type[1]   : com.thoughtworks.xstream.converters.collections.CollectionConverter
class[2]            : org.openhab.core.thing.xml.internal.ThingDescriptionList
required-type[2]    : org.openhab.core.thing.xml.internal.ThingDescriptionList
converter-type[2]   : org.openhab.core.thing.xml.internal.ThingDescriptionConverter
version             : 1.4.19
-------------------------------
	at org.openhab.core.config.xml.util.GenericUnmarshaller.requireNonEmpty(GenericUnmarshaller.java:95) ~[?:?]
	at org.openhab.core.thing.xml.internal.ChannelTypeConverter.readItemType(ChannelTypeConverter.java:77) ~[?:?]
	at org.openhab.core.thing.xml.internal.ChannelTypeConverter.unmarshalType(ChannelTypeConverter.java:175) ~[?:?]
	at org.openhab.core.thing.xml.internal.ChannelTypeConverter.unmarshalType(ChannelTypeConverter.java:1) ~[?:?]
	at org.openhab.core.thing.xml.internal.AbstractDescriptionTypeConverter.unmarshal(AbstractDescriptionTypeConverter.java:193) ~[?:?]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:132) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:99) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:92) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:86) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:81) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52) ~[bundleFile:1.4.19]
	at org.openhab.core.thing.xml.internal.ThingDescriptionConverter.unmarshal(ThingDescriptionConverter.java:56) ~[?:?]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1421) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1399) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1350) ~[bundleFile:1.4.19]
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1304) ~[bundleFile:1.4.19]
	at org.openhab.core.config.xml.util.XmlDocumentReader.readFromXML(XmlDocumentReader.java:105) ~[bundleFile:?]
	at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.parseDocuments(XmlDocumentBundleTracker.java:396) [bundleFile:?]
	at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:382) [bundleFile:?]
	at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:347) [bundleFile:?]
	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) [?:?]

I suspect a change in core.
Same behaviour observed in my dev environment on eclipse.

@clinique
Copy link
Contributor Author

Progressing in my search. This seems related to channel-types of kind trigger that has no item-type, witch seems normal.

@clinique
Copy link
Contributor Author

clinique commented Mar 11, 2022

Adding
<item-type>String</item-type>
to trigger channel-types I stopped having errors in log at start.

@J-N-K
Copy link
Member

J-N-K commented Mar 11, 2022

This error message was introduced in #2775.

@clinique
Copy link
Contributor Author

clinique commented Mar 11, 2022

Ok, but it is not only an error message, it prevents things from loading their channels.

@J-N-K
Copy link
Member

J-N-K commented Mar 11, 2022

Yes, but the newly introduced requireNonEmpty throws an exception if the element is empty. This prevents the channel from loading.

@wborn
Copy link
Member

wborn commented Mar 12, 2022

Yes it is probably caused by my PR. I'll have a look after some coffee. 😉

wborn added a commit to wborn/openhab-core that referenced this issue Mar 12, 2022
Trigger channel types failed to load because the item type became required with the changes in openhab#2775.
Also adds a unit test for the ThingDescriptionReader to prevent future regressions.

Fixes openhab#2831

Signed-off-by: Wouter Born <github@maindrain.net>
kaikreuzer pushed a commit that referenced this issue Mar 12, 2022
Trigger channel types failed to load because the item type became required with the changes in #2775.
Also adds a unit test for the ThingDescriptionReader to prevent future regressions.

Fixes #2831

Signed-off-by: Wouter Born <github@maindrain.net>
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/trigger-channeltype-itemtype-must-not-be-null-or-empty/134163/3

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 12, 2023
Trigger channel types failed to load because the item type became required with the changes in openhab#2775.
Also adds a unit test for the ThingDescriptionReader to prevent future regressions.

Fixes openhab#2831

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: 92a6c1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants