OH 3.3 Integrated tabs not working

Dear all,

I upgraed my openhabian system on RPi4 to 3.3.0 stable. I use OpenJDK 11.

When using browser on Win11, Android as well as openhab android app, the integrated tabs (location, equipment, properties) are not working. Page is loading but nothing is happening while I get the error below. Showing own pages incl. charts work without errors.

I searched a lot already and find several things that might be related but could not match it as I am not such and expert and not fix it.

2022-06-30 10:47:59.858 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - Problem with writing the data, class org.openhab.core.io.rest.Stream2JSONInputStream, ContentType: application/json
2022-06-30 10:47:59.859 [ERROR] [internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request.
java.lang.NullPointerException: Cannot invoke "javax.script.Compilable.compile(java.io.Reader)" because "engine" is null
	at org.openhab.transform.javascript.internal.JavaScriptEngineManager.getCompiledScriptByFilename(JavaScriptEngineManager.java:77) ~[?:?]
	at org.openhab.transform.javascript.internal.JavaScriptTransformationService.transform(JavaScriptTransformationService.java:119) ~[?:?]
	at org.openhab.core.transform.TransformationHelper.transform(TransformationHelper.java:125) ~[?:?]
	at org.openhab.core.transform.TransformationHelper.transform(TransformationHelper.java:100) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.considerTransformation(EnrichedItemDTOMapper.java:148) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:81) ~[?:?]
	at org.openhab.core.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:64) ~[?:?]
	at org.openhab.core.io.rest.core.internal.item.ItemResource.lambda$2(ItemResource.java:219) ~[?:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.util.HashMap$KeySpliterator.tryAdvance(HashMap.java:1728) ~[?:?]
	at java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:292) ~[?:?]
	at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206) ~[?:?]
	at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:169) ~[?:?]
	at java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:298) ~[?:?]
	at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681) ~[?:?]
	at org.openhab.core.io.rest.Stream2JSONInputStream.fillBuffer(Stream2JSONInputStream.java:91) ~[?:?]
	at org.openhab.core.io.rest.Stream2JSONInputStream.read(Stream2JSONInputStream.java:67) ~[?:?]
	at java.io.InputStream.read(InputStream.java:293) ~[?:?]
	at java.io.InputStream.transferTo(InputStream.java:782) ~[?:?]
	at org.openhab.core.io.rest.core.internal.GsonMessageBodyWriter.writeTo(GsonMessageBodyWriter.java:83) ~[?:?]
	at org.openhab.core.io.rest.core.internal.MediaTypeExtension.writeTo(MediaTypeExtension.java:84) ~[?:?]
	at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1543) ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:249) ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122) ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222) ~[bundleFile:3.4.5]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[bundleFile:3.1.0]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) ~[bundleFile:3.4.5]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:74) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:90) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.46.v20220331]
	at java.lang.Thread.run(Thread.java:833) [?:?]

Thanks for hints!

It looks like the JavaScript engine is not found. I would expect that under Java 15+ but not on Java 11. Can you double check your Java version?

1 Like

Thanks for the reply. As other pages are working, I would wonder but checking java version seams to be easy:

openhabian@openhabian:~ $ java -version
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.3+7-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)

Other pages work because they don‘t use the JavaScript transformation.

You have Java 17. I believe there is an addon on the marketplace that re-adds Nashorn. Try if that helps. But please note that Java17 support is at most experimental, not a supported scenario.

Hm correct, how can I install the correct version? Trying openhabian config is doing something but version does not change afterwords! Which version is recommended?

Trying openJDK 11:

openhabian@openhabian:~ $ java -version
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.3+7-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)
openhabian@openhabian:~ $ sudo openhabian-config
[sudo] Passwort für openhabian:
2022-06-30_11:52:57_CEST [openHABian] Checking for root privileges... OK
2022-06-30_11:52:57_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-06-30_11:52:57_CEST [openHABian] openHABian configuration tool version: [main]{2022-06-30T11:22:00+02:00}(db24897)
2022-06-30_11:52:57_CEST [openHABian] Checking for changes in origin branch main... OK
2022-06-30_11:53:07_CEST [openHABian] Switching to branch main... OK
2022-06-30_11:53:07_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-06-30_11:53:20_CEST [openHABian] Updating Linux package information... OK
2022-06-30_11:53:34_CEST [openHABian] Reconfiguring OpenJDK 11... OK
2022-06-30_11:53:37_CEST [openHABian] Checking for default openHABian username:password combination... OK
2022-06-30_11:53:37_CEST [openHABian] We hope you got what you came for! See you again soon ;)
openhabian@openhabian:~ $ java -version
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.3+7-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)

Looks like a bug in openhabian. How can I install correct java version manually?
Thanks and best

Even the following command does not change it:

 sudo apt install openjdk-11-jdk

Afterwords still:

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.3+7-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)

I could find out that both are installed but v17 still selected. The following command helped to change:

sudo update-alternatives --config java

```yaml

openhabian@openhabian:~ $ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-post-Raspbian-1deb11u1)
OpenJDK Server VM (build 11.0.15+10-post-Raspbian-1deb11u1, mixed mode)

Plus reboot (I assume openhab then changes default java version) fixed it.

I reported an issue: Changing from openjdk 17 to openjdk 11 not working via openhabian-config · Issue #1697 · openhab/openhabian · GitHub