Can't install openHAB

Hello,
i have trouble installing openHab 3.0.1 on my Windows 10 pc. I followed the steps on the download page (except step #2 since I think I only need it for programming; please correct me if I’m wrong). When I run the start.bat file the command shell closes after a second and I’ve got the following error in the openhab.log file:

2021-02-23 21:10:47.919 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework
java.lang.RuntimeException: Error occurred while checking the system module.
at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:311)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:87)
at org.eclipse.osgi.internal.framework.EquinoxContainer.(EquinoxContainer.java:68)
at org.eclipse.osgi.launch.Equinox.(Equinox.java:31)
at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
at org.apache.karaf.main.Main.launch(Main.java:256)
at org.apache.karaf.main.Main.main(Main.java:178)
Caused by: org.osgi.framework.BundleException: Invalid manifest header Export-Package: “org.osgi.dto;version=“1.0”,org.osgi.resource;version=“1.0”,org.osgi.resource.dto;version=“1.0”;uses:=“org.osgi.dto”,org.osgi.framework;version=“1.8”,org.osgi.framework.dto;version=“1.8”;uses:=“org.osgi.dto”,org.osgi.framework.hooks.bundle;version=“1.1”;uses:=“org.osgi.framework”,org.osgi.framework.hooks.resolver;version=“1.0”;uses:=“org.osgi.framework.wiring”,org.osgi.framework.hooks.service;version=“1.1”;uses:=“org.osgi.framework”,org.osgi.framework.hooks.weaving;version=“1.1”;uses:=“org.osgi.framework.wiring”,org.osgi.framework.launch;version=“1.2”;uses:=“org.osgi.framework”,org.osgi.framework.namespace;version=“1.1”;uses:=“org.osgi.resource”,org.osgi.framework.startlevel;version=“1.0”;uses:=“org.osgi.framework”,org.osgi.framework.startlevel.dto;version=“1.0”;uses:=“org.osgi.dto”,org.osgi.framework.wiring;version=“1.2”;uses:=“org.osgi.framework,org.osgi.resource”,org.osgi.framework.wiring.dto;version=“1.2”;uses:=“org.osgi.dto,org.osgi.resource.dto”,org.osgi.service.condpermadmin;version=“1.1.1”;uses:=“org.osgi.framework,org.osgi.service.permissionadmin”,org.osgi.service.packageadmin;version=“1.2”;uses:=“org.osgi.framework”,org.osgi.service.permissionadmin;version=“1.2”,org.osgi.service.resolver;version=“1.0”;uses:=“org.osgi.resource”,org.osgi.service.startlevel;version=“1.1”;uses:=“org.osgi.framework”,org.osgi.service.url;version=“1.0”,org.osgi.util.tracker;version=“1.5.1”;uses:=“org.osgi.framework”,org.apache.karaf.version;version=“4.2.7”,org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=“4.2.7”,org.apache.karaf.jaas.boot;uses:=“javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework”;version=“4.2.7”,org.apache.karaf.info;version=“4.2.7”, org.apache.karaf.branding, sun.misc, org.apache.karaf.jaas.boot;uses:=“javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework”;version=4.2.7, org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.7, org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.7, org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.7”
at org.eclipse.osgi.util.ManifestElement.parseHeader(ManifestElement.java:353)
at org.eclipse.osgi.container.builders.OSGiManifestBuilderFactory.createBuilder(OSGiManifestBuilderFactory.java:85)
at org.eclipse.osgi.storage.Storage.getBuilder(Storage.java:632)
at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:263)
… 6 more

I have installed the Java 11 from Zulu correctly and the command “java -version” prints

openjdk version “11.0.10” 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

Thanks in advance for any help!

We are looking at 2 different step 2. Please be more specific on what you have done. the step 2 I see is unzipping openHAB which is obviously required.

Sorry, I was wrong. Of course I installed the runtime. I then skipped step #3 because I don’t need offline access and when executing the start.bat file I encountered the problem I posted.

Tell us EXACTLY what you DID do.

. I then skipped step #3 because I don’t need offline access and when executing the start.bat file I encountered the problem I posted.

Raphael is referring to these steps:

Ok I looked at the installation instructions not the download ones. Curious they do not match. The third step is only needed if it will be run with no Internet access and you wish to install additional addons.

Unlike the installation instructions it omits setting the JAVA-HOME environment variable. That could be the issue.

Yeah, seems like the variable is wrong. I tried some things with the JAVA_HOME variable now. It is currently “C:\Program Files\Java\jdk-11.0.1”. When I run the “java -version” command i get:

java version “11.0.10” 2021-01-19 LTS
Java™ SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)

When I run the start.bat file I get the error now:

JAVA_HOME is not valid: “C:\Program Files\Java\jdk-11.0.1”
The system cannot find the batch label specified - END

Perhaps it has a dash instead of an underscore. Search for OpenHAB windows and the installation page is returned. I am currently working from my phone.

Hello, I got it running now. I reinstalled Java and selected the right path for the JAVA_HOME variable again and also added the path to the “bin” directory to the PATH variable. But thank you for help, I don’t think I would have checked the JAVA_HOME path without you.

1 Like

For reference here is the official documentation for installing on Windows.