OH3: "Cannot build sitemap" - where should I look?

Hi,
I just switched to OH3 and most things seem to work fine.
But the system seems to be unable to build a sitemap - and I don’t know where to look:

2020-12-22 17:16:06.043 [ERROR] [omponents.UIComponentSitemapProvider] - Cannot build sitemap feldstrasse

java.lang.ClassCastException: class java.math.BigDecimal cannot be cast to class java.lang.Integer (java.math.BigDecimal and java.lang.Integer are in module java.base of loader 'bootstrap')

	at org.openhab.core.model.sitemap.sitemap.impl.WebviewImpl.eSet(WebviewImpl.java:171) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.setWidgetPropertyFromComponentConfig(UIComponentSitemapProvider.java:286) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildWidget(UIComponentSitemapProvider.java:195) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildWidget(UIComponentSitemapProvider.java:262) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildWidget(UIComponentSitemapProvider.java:262) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.buildSitemap(UIComponentSitemapProvider.java:146) ~[bundleFile:?]

	at org.openhab.core.ui.internal.components.UIComponentSitemapProvider.getSitemapNames(UIComponentSitemapProvider.java:105) [bundleFile:?]

	at org.openhab.ui.basic.internal.render.PageRenderer.renderSitemapList(PageRenderer.java:218) [bundleFile:?]

	at org.openhab.ui.basic.internal.servlet.WebAppServlet.showSitemapList(WebAppServlet.java:135) [bundleFile:?]

	at org.openhab.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:167) [bundleFile:?]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [bundleFile:3.1.0]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.Server.handle(Server.java:494) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

	at java.lang.Thread.run(Thread.java:834) [?:?]

The validator in the main ui told me, the sitemap looks fine.
How can I find out what is causing the problem?

Thanks,
Boby

As a first step let us know the definition of your sitemap file. Without that information noone will be able to support you.
Further information about the items used in the sitemap file might be needed, too.

Well, the sitemap is 343 lines long, approx the same amount of items - I need to clean up first, because there are passwords etc. included for webcam urls.

If there is no hint in the logfiles, I will do try & error by adding block by block and see where the problem start. But the sitemap validation both in VSCode and the main UI don’t throw an error.
And without a single hint at e.g. what object the problem occurs, the error message in the logfile is completely useless (for me).

I’ll come back when I’ve narrowed down the problem. Thanks!

In that case I suggest to condense it down to a (temporary testing) sitemap with the absolute necessary parts. That will simplify your testing as well and might even narrow down possible culprits :wink:

2 Likes

Found it (at least the first problem):

The problem is caused by the following line:

Webview item=Dummy label="Kamerabild" icon="camera1" url="http://<ip-address of the raspberry>:8080/static/DoorCam.html" height=17

Are there any changes necessary for webview items?

Thanks,
Boby

Oh, I just found out that the ipcam binding supports my instar camera. Now I only need to find out how to integrate it, then I can get rid off the webview item anyway.

1 Like

I’m also having the same issue with a webview item - even one generated by the UI for a simple image

1 Like

I opened an issue on github as this seems to be a general problem:

I have a sitemap working in iOS app and browsers with this line:

Webview url="http://192.168.1.2:8080/static/allcams.html" height=17

My guess is you can not mix item and url at the same time ?

Even even leaving out the “item”, it doesn’t work:

    Text item=Dummy icon="camera1" label="Gartentor" {
        Frame label="Gartentor" {
            Switch item=Gartentor icon="camera1" mappings=[ON="Öffnen"]
            Webview url="http://192.168.1.50:8080/static/DoorCam.html" label="DoorCam" height=17
        }
    }

…results into “cannot build sitemap” :frowning:

I am using sitemap files not the new sitemap pages. So perhaps use that method to get yourself going.

1 Like

I removed everything step by step and found some elements I forgot. Now the new sitmap page is working already; but there’s still a bug with webview elements (github issue already opened)

1 Like