OH3: Image not shown in sitemap

  • Platform information:
    • Hardware: RPI4
    • OS: Openhabian
    • Java Runtime Environment: 11.0.9
    • openHAB version: 3

I change from Openhab 2.5 to 3.0 and startet from scratch to build up my system i already had before.
Today i built the sitemap, but i am not able to show an image in the sitemap.

Image url=“http://openhabiandevice:8080/static/zigbee_network.png

I tried the ip-address and also “localhost”, but the image is not shown in Bacis UI. I only see two separators where the image should be between them. If i put “http://openhabiandevice:8080/static/zigbee_network.png” into my browser i can see the image, so it is existing and the URL is correct.
I use managed sitemap and built it via design. The code in OH3 for the image looks exactly like my old code in the sitemap file of OH2.5.
I cannot imagine, the the image support is broken in OH3 managed sitemaps, but i have no other idea.

I’ve got the same problem.
I’m running Openhab 3 on a debian 10 virtual machine on ESX.
Java Version: OpenJDK Runtime Environment Zulu11.43+55-CA (build 11.0.9.1+1-LTS)

In the openhab.log I found the following entry:
[ERROR] [omponents.UIComponentSitemapProvider] - Cannot build sitemap page_ead760c441
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.ImageImpl.eSet(ImageImpl.java:229) ~[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:176) ~[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) [?:?]

Meantime i put the image on a Image Card on the Overview page. There it is shown correctly. So i am quite sure the Image support in a sitemap is broken in ObenHAB 3.0.0.
Can someone confirm it?

1 Like

same issue here - having a png file on my domain it is not shown in the browser via sitemap (ui or code) f.e. Image url=“http://…image.png” label=“wallpaper” in a special upper frame - overview works.

Confirmed issue I think :
https://github.com/openhab/openhab-webui/issues/763