yuuvis® RAD Q&A

+1 vote
by (2.9k points)

Dear OS,

Nicolai mentioned starting with yuuvis 7.x every microservice will run with Java 11 by default.
https://qa-rad.yuuvis.com/index.php?qa=1612&qa_1=java-11-uprade-jdk&show=1612#q1612

We changed all our microservices to java 11 and the microservices don't start.

a.changelistenerservice.10050    : Exception in thread "main" java.lang.UnsupportedClassVersionError: de/gema/zpue/changelistener/ChangelistenerApplication has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

We are using yuuvis 7.10 but service-manager/jdk/bin/java.exe is Java 8
and service-manager/jdk_64/bin/java.exe is also Java 8

core-service/jdk/bin/java.exe is Java 11.

We cannot change the JAVA_HOME to the core-service Java Version because core-service and service-manager are not running on the same machine. Do we have to install OpenJDK 11 on the machine and change JAVA_HOME to it or should yuuvis 7.x by default come with Java 11?

Thank you

1 Answer

0 votes
by (19.6k points)

Hello Dennis,

sorry but we postponed switching to java 11 in the service-manager to yuuvis RAD 8.x (and maybe 7.x LTS). You can use one of the following two possibilities to run your microservice anyway:
- Compile the microservice again with java 1.8. As long as no java 11 specific features were used this should work.
- Put a java 11 jdk (e.g. copy from core-service installation) anywhere on the server and start the microservice in the servicewatcher-sw.yml as an executable type as follows:

  • name: j11service
    instances: 1
    type: executable
    path: D:/Java11/bin/java.exe
    args:
    • -Xmx256M -jar ${appBase}\j11service\j11service-app.jar

Alternatively you can run a .bat file instead of the java.exe as follows:

  • name: j11servicebat
    instances: 1
    type: executable
    path: ${appBase}/j11service/run_j11service.bat

Best regards
Nicolai

by (19.6k points)
The correct servicewatcher-sw.yml entry for starting the jar directly is as follows:

- name: j11service
  instances: 1
  type: executable
  path: D:/Java11/bin/java.exe
  args:
    - -Xmx512M
    - -jar
    - ${appBase}\j11service\j11service-app.jar
    - --spring.profiles.active=prod,cloud
    - --server.port=8090
...