Comments on Java test-drive

Just one more thought why I wanted to change to Java 11. I did a try on Openhab 3 what works on Java 11. If I can use both Openhab2.5 and Openhab 3 on same Java then I sould not change Java settings all the time when I want to work on change to Openhab3. I do not believe on onetime change with a script.

There are no known issues with Java 11 and the new rule engine! However, there is a reported issue (I haven’t tracked it down yet) with manual installations of Jython and Java 11. This is not an issue when using an updated version of my Jython addon using 2.7.2, which I have not distributed yet, but can be built from the source in my PR.

I use jython for my rules and after chanhing the Java version i changed immediately back, because it simply does not work.

You must mention that you’re using Windows and you have hit a Windows specific problem with nrjavaserial that does not exist as such on Linux hence not on openHABian. Please help keeping communication clean and don’t cross-post into every related thread just because you’re frustrated.
I understand that but it isn’t helpful.

Just changed the JAVA version. So far everything seems to run very well. Many thanks @mstormi for paving the road for OH3 :+1:

3 Likes

You “must” read my comments before you judge anything and I’m very polite now. Java on non-openHABian
Not mentioning that I’ve shared complete debug logging etc.
If I would receive useful information would be helpful.
I was not frustrated at all up till now and I do not give up.
I would like to change to Java 11 still.

So now my system runs on java version “1.8.0_231”
Java™ SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot™ 64-Bit Server VM (build 25.231-b11, mixed mode)
Operating system windows10 and it runs on Intel NUC I7 8gb ram + ssd
openHAB 2.5.6 Build #139
I can start Openhab only with start.bat. It does not start as a service.
I get the following messages in karaf consol:
karafconsollog.txt (5.8 KB)
I use these bundles:
bundle_list.txt (19.9 KB)
DSL rules are working fine but NGRE rule engine does not start.
ruleengine.txt (5.0 KB)
I found another error log in userdata\catch folder: 1591735354178.log (2.6 KB)
It would be helpful to have a hint what I need to check for running Openhab as a service.
Tomorrow I try to fix NGRE rule engine.

1 Like

Off topic, this thread is about openHABian not openHAB on windows.

No. It means: please use a separate thread for your problem and don’t post into others’ threads unless you contribute to what’s the topic there.
The Java test-drive is on openHABian which is Linux ONLY as can be read in the original post.
This thread is just comments on that, so your posts do not belong here.
Hence also my request to keep communications clean.
As a moderator, I’m asking you to follow the community guidelines. Thank you for your cooperation.

Ok, as you wish.
Sorry I was reading it fast.

I just installed the 32bit version on pi3. Working like a champ!!

I like the new openhabian changes, repo related that is!

Question, can the 64bit be used on buster? Is there an advantage?

You mean 64 bit Java on a standard 32 bit OS ?
See README.
I guess it would work, but it’s neither tested nor recommended as it has nothing but disadvantages (larger memory consumption), that’s why openHABian refuses to install it like that.

@mstormi That is what I meant 64bit on 32bit OS. I went with 32bit as the most valid assumption for the 32bit OS, I picked correct. Thanks for info, missed the info the first time.

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.