openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

What Java package on DSM7 for OpenHAB SPK? #190

Open ansorg opened 3 years ago

ansorg commented 3 years ago

hello, I run the openHAB 2.4 package on a DS214. That one has no docker support so I need the native synology package. Works fine in DSM6 with the Synology-provided Java8.

I just learned that Synology does not provide any Java for DSM7. That would apparently stop openHAB from working.

Then I found this https://github.com/rednoah/java-installer and tried it: I removed Java8 from the DS214 and installed some form of jdk-16 through this installer.

But with that the openHAB package does not work anymore. On start I get

2021-07-23 08:20:40.184 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework
java.lang.IllegalStateException: Could not create a builder for the system bundle.
    at org.eclipse.osgi.storage.Storage.checkSystemBundle(Storage.java:287)
    at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:87)
    at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:68)
    at org.eclipse.osgi.launch.Equinox.<init>(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.1",org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.1",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.1",, 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.1, org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.1, org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.1, org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.1"
    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:273)
    ... 6 more

Any suggestion on how to get OpenHAB-2.4 spk working in DSM7?

thanks