Openhab not starting after update from 3.4 to 4M1 in Raspi

Hi,
i’m on openhab 3.4.2-1 without any issues, did update this morning to 4M1 (Raspi4). But openhab does not show up anymore and is stuck in logs (see below).

As soon as i downgrade it works again. I already did a CLI clear cache, reboots…
Any further hints how to make a smooth transition?
Kind Regards Norbert

        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        ... 12 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core/4.0.0.M1: missing requirement [org.openhab.core/4.0.0.M1] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
        at org.apach

This line basically tells why openHAB does not start: it requires Java 17.

Please always read the release notes before installing a new version, this helps preventing bad surprises.

1 Like

i’m sorry. did not check upfront.
I’m on Java v11.

openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

Is there any information available which OpenJAVA 17 to use?
In v3 there was the change in mind to finally better use AdoptOpenJDK.

Is AdoptOpenJDK 17 also the way to go with Openhab4 ?

Can anyone be so kind and provide a site/info on how to upgrade from v11 to v17. Do i have to use additional sources on APT-package management?

Cheers, Thanks Norbert

I have used this one:


without any problem.

Eclipse Adoptium OpenJDK is used by the Docker container, openHABian is using OpenJDK (was using Zulu OpenJDK in the past), I am using GraalVM, so there are many options. I am not sure if there is any recommendation at the moment, I would use what openHABian provides.

Note that OpenJDK 17 on openHABian requires a 64-bit OS I think.

So either use openHABian to install OpenJDK 17, or install it from your default APT sources (if you are on Debian).

Thanks. so OpenJDK is just OpenJDK not ZuLu OpenJDK and not AdoptJDK.

++ Is the one from Openhabian = Oracle Version. So the one available on default debian?

++ headless or normal?? (openjdk-17-jdk-headless)

++ as you mention 64bit, im using Raspian/RaspiOS with 32bit. does this work for Java17 at all ?

Many Thanks
Norbert

openhabian uses openJDK from debian repository. This is an excerpt from openhabian-config:

  if ! apt-cache show "openjdk-${1}-jre-headless" &> /dev/null; then
    echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/java.list
    cond_redirect apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
    cond_redirect apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138

64bit does not run on a 32bit system. As long as a 32bit package is available in the repo it will be installed.
The debian repo does not contain openJDK-17-jdk for buster as far as I know as jdk 17 in debian repo requires higher version of glibc.

You can install Zulu OpenJDK 17 32-Bit builds, but they aren’t available in any apt repository.

You have to download and install from the Zulu website, they provide install instructions there: https://www.azul.com/downloads/?version=java-17-lts&os=debian&package=jdk