Comments on Java test-drive

Hi,
anyone experienced issues with the systeminfo binding, or is it just me?

I’m running on openhabian snapshot #141 with Zulu 32bit Java11 on a RPi4

The systeminfo thing is online, but i dont get item updates…

I set the log to DEBUG… but i dont get any error messages…

I have no problems running that under Zulu 11.

okay… good to know… will have a look what causes my systeminfo items to stop.

Now i tried ist again in a Debian VM on my synology. Used the master Branch and tried to switch ti Zulu 11 32 Bit. Got the following errors:

$ systemctl stop openhab2.service

$ java_alternatives_reset
update-alternatives: Fehler: keine Alternativen für policytool
update-alternatives: Fehler: keine Alternativen für javac

$ update-alternatives --install /usr/bin/java java /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/java 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/java wird verwendet, um /usr/bin/java (java) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/jjs jjs /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/jjs 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/jjs wird verwendet, um /usr/bin/jjs (jjs) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/keytool keytool /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/keytool 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/keytool wird verwendet, um /usr/bin/keytool (keytool) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/pack200 pack200 /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/pack200 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/pack200 wird verwendet, um /usr/bin/pack200 (pack200) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/rmid rmid /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/rmid 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/rmid wird verwendet, um /usr/bin/rmid (rmid) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/rmiregistry rmiregistry /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/rmiregistry 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/rmiregistry wird verwendet, um /usr/bin/rmiregistry (rmiregistry) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/unpack200 unpack200 /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/unpack200 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/unpack200 wird verwendet, um /usr/bin/unpack200 (unpack200) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/jexec jexec /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/lib/jexec 1000000
update-alternatives: /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/lib/jexec wird verwendet, um /usr/bin/jexec (jexec) im automatischen Modus bereitzustellen
OK

$ java_zulu_install_crypto_extension
2020-06-18_13:36:44_CEST [openHABian] Installing Java Zulu Cryptography Extension Kit to enable cryptos using more then 128 bits...
$ wget -qO /tmp/openhabian.b84hA/crypto.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip

$ unzip /tmp/openhabian.b84hA/crypto.zip -d /tmp/openhabian.b84hA
Archive:  /tmp/openhabian.b84hA/crypto.zip
   creating: /tmp/openhabian.b84hA/ZuluJCEPolicies/
  inflating: /tmp/openhabian.b84hA/ZuluJCEPolicies/LICENSE
  inflating: /tmp/openhabian.b84hA/ZuluJCEPolicies/README.txt
  inflating: /tmp/openhabian.b84hA/ZuluJCEPolicies/DISCLAIMER
  inflating: /tmp/openhabian.b84hA/ZuluJCEPolicies/local_policy.jar
  inflating: /tmp/openhabian.b84hA/ZuluJCEPolicies/US_export_policy.jar

$ cp /tmp/openhabian.b84hA/ZuluJCEPolicies/local_policy.jar /tmp/openhabian.b84hA/ZuluJCEPolicies/US_export_policy.jar /opt/jdk/zulu11.39.15-ca-jdk11.0.7-linux_i686/bin/../lib/security
OK

$ systemctl start openhab2.service

$ java -version
java: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
OK
2020-06-18_13:36:47_CEST [openHABian] Checking for default openHABian username:password combination... SKIPPED (method not implemented)
2020-06-18_13:36:47_CEST [openHABian] We hope you got what you came for! See you again soon ;)
openhabadm@openhab2:/etc$ java -version
java: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

Error are made with the debug option on

Hmmm., What distro are you on i.e. what does cat /etc/os-release return. I think it might not have all of the preinstalled packages, did you run the unattended setup before trying to install Zulu11? I believe it is because zlib is not installed on your system.

Result of the cat command is

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

and as far as i know the zlib is part of the zliblg and this package is upto date

zlib1g ist schon die neueste Version (1:1.2.11.dfsg-1).

At the end it is a plain debian where i installed openhabian with wget an made the steps i reuire.

Your wrote that you tried to switch to Zulu 11 32 Bit
and that Zlib is installed

is it the 32bit or 64bit library ?

In case you use java based on 32bit you also need to install related 32bit libraries.

I tried Zulu 11 64 Bit als well and it did not work

same or an other error message ?

Sorry, but did not looked at the error, because i had not the time to check that carefully. After teh first error it was my goal to bring openHAB online again

$ java -version
openjdk version “11.0.7” 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+61-CA (build 11.0.7+10-LTS)
OpenJDK Client VM Zulu11.39+61-CA (build 11.0.7+10-LTS, mixed mode)

Everything seems to work (bindings tested: Deconz, Shelly, OpenWeatherMap, BoseSoundTouch, Chromecast, enocean, Neato, Hue) - all rules firing as expected. :+1:

OpenHABian on VM Debian Buster on Synology Hardware DS918+ (2GB VM Ram)
4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64

running for 2 days without problems sofar:

addons.cfg
binding = expire1,zwave,astro,denonmarantz,chromecast,gpstracker,snmp,logreader,networkupstools,systeminfo,samsungtv,rfxcom,mail,neeo,mqtt,icalendar
    ui = paper,basic,habmin,habpanel,dashboard,restdocs
    persistence = influxdb,rrd4j,mapdb
    transformation = xslt,map,regex,javascript,jsonpath,xpath,scale,exec
    misc = homekit,neeo

update to master branche

old java:
openjdk version “1.8.0_252”
OpenJDK Runtime Environment (Zulu 8.46.0.19-CA-linux32) (build 1.8.0_252-b14)
OpenJDK Server VM (Zulu 8.46.0.19-CA-linux32) (build 25.252-b14, mixed mode)

new java:
openjdk version “11.0.7” 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)

i had some hope to solve the iCalendar handshake by newer java.

@mstormi will be there any new version of the tr064 binding?

Running oh on rpi 3B+ openhabianpi (still stretch) and switched to java 11 some days ago. No complaints up to know …

This is the one i’m using

now i fixed my instllation error and found that rules with jython are not working. They are simply not loaded

Sorry to repeat myself, but you will need to wait until my PR is merged or I update the beta Jython addon…

Did you realize this “maybe openhabian-config issue” deleting certs when switching to java11, @mstormi ?

Dlinksmarthome binding doesn’t work due to a problem with javax/xml/soap/SOAPException not being found.

https://github.com/openhab/openhab-addons/issues/8194