0

Does anyone know how to get SOS Job Scheduler version 1.13 working with an AdoptOpenJDK JDK 8 on Windows? The Job Scheduler itself seems to work, but the JOC tool won't run, failing to find a JVM.

The Windows Service for JOC gets stuck in the "Starting" state, and the following appears in its log file:

[2019-12-08 12:14:36] [info]  [ 2168] Commons Daemon procrun (1.0.15.0 64-bit) started
[2019-12-08 12:14:37] [info]  [ 2168] Running 'sos_joc' Service...
[2019-12-08 12:14:37] [error] [ 2916] Unable to find Java Runtime Environment.

I'm currently running SOS Job Scheduler 1.11, and was able to get that running by setting the vm properties in config\factory.ini and config\sos.ini to point to the bin\server\jvm.dll inside the AdoptOpenJDK installation. I set the same things in the 1.13 Job Scheduler configuration. But I don't see anywhere in the "Jetty" config files for JOC 1.13 to make a similar setting.

I have added the AdoptOpenJDK JRE directory to the system %PATH% as suggested by the SOS config files, but that had no apparent effect. I also set the system %JAVA_HOME% and %JRE_HOME% to point to AdoptOpenJDK; also no effect. I'd rather not do these things anyway, because these are global settings which would affect other applications also running on this server.

We're not running Oracle JDK/JREs because of Oracle's new Java licensing terms, where it's no longer free-as-in-beer for production use.

This is on Windows Server 2016 Datacenter on Azure.

Andrew Janke
  • 115
  • 5
  • 1
    Since the service is started by [procrun](https://commons.apache.org/proper/commons-daemon/procrun.html), there is probably an executable named `prunmgr.exe` or `sos_jocw.exe` in the installation directory. Run it to configure the service. – Piotr P. Karwasz Feb 20 '20 at 21:17

1 Answers1

0

This may be a bit late but I've gotten it to work. Your paths may be different so I'd check those before running commands. Here's how.

Install OpenJDK13U-jdk_x64_windows_openj9_13.0.2_8_openj9-0.18.0.msi from https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8_openj9-0.18.0/OpenJDK13U-jdk_x64_windows_openj9_13.0.2_8_openj9-0.18.0.msi

Make sure system environment variable JAVA_HOME is set to the AdoptOpenJDK path. Mine is C:\Program Files\AdoptOpenJDK\jdk-13.0.2.8-openj9\bin and should be the default.

Also make sure system environment variable PATH includes the AdoptOpenJDK path.

Open a command prompt with administrative rights, run the following commands-

"C:\Program Files\sos-berlin.com\joc\service\set_java_home_for_jetty_windows_service.cmd" "C:\Program Files\AdoptOpenJDK\jdk-13.0.2.8-openj9"
cd "C:\Program Files\sos-berlin.com\joc\jetty_base"
"C:\Program Files\AdoptOpenJDK\jdk-13.0.2.8-openj9\bin\java" -jar "C:\Program Files\sos-berlin.com\joc\jetty\start.jar" --create-startd --add-to-start=jsp

You would still get an error like this:

Error scanning entry com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class from jar file:///C:/Users/Username/.m2/repository/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar"

This is a known issue with this version of the icu4j-2.6.1.jar file. You have to replace it. Download the icu4j-65_1.jar file from https://github.com/unicode-org/icu/releases/download/release-65-1/icu4j-65_1.jar.

C:\ProgramData\sos-berlin.com\joc\jetty_base\webapps\joc.war file has to be updated with the new icu4j file.

Copy the joc.war to its own temporary folder.
Run the following command in your open command prompt:

cd C:\YourTempFolder
jar -xvf joc.war

Delete the icu4j-2.6.1.jar file in the WEB-INF\lib folder. Copy the icu4j-65_1.jar file into the WEB-INF\lib folder.

Run the following command in your open command prompt:

rm joc.war   
jar -cvf joc.war *
rename "C:\ProgramData\sos-berlin.com\joc\jetty_base\webapps\joc.war" "C:\ProgramData\sos-berlin.com\joc\jetty_base\webapps\joc.war.old"
copy joc.war C:\ProgramData\sos-berlin.com\joc\jetty_base\webapps

Reboot the machine.

Open Task Manager, select the Services tab, and make sure the sos_scheduler_YourMachinename_40444 service is Running. If not, make sure the sos_joc service is stopped, and then start the sos_scheduler_YourMachinename_40444 service. Once that is running, start the sos_joc service.

Click on the link on the desktop to Open JOC. You should be good to go.

Andrew Janke
  • 115
  • 5
Grip
  • 1
  • Sorry about the formatting. This website strips some spacing and line feeds but everything you need should be there. Enjoy. – Grip Feb 20 '20 at 19:44