diff --git a/.github/workflows/camunda.yml b/.github/workflows/camunda.yml index d3b3f59a..6b6072fd 100644 --- a/.github/workflows/camunda.yml +++ b/.github/workflows/camunda.yml @@ -33,10 +33,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven @@ -163,10 +163,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven diff --git a/.github/workflows/ldap.yml b/.github/workflows/ldap.yml index ace872f9..22fbfd3f 100644 --- a/.github/workflows/ldap.yml +++ b/.github/workflows/ldap.yml @@ -33,10 +33,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven diff --git a/README.md b/README.md index 1da7a698..a265651e 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m ## Prerequisites +- [**Java 17 JDK**](https://formulae.brew.sh/formula/openjdk@17): CWS only runs on JDK 17. (NOTE: Cannot use JRE) + - For Homebrew users: + - Install OpenJDK 17 using: `brew install openjdk@17` + - Check the exact version installed using `/usr/libexec/java_home -V` + - Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)` + - Replace the X.X.X version above with the OpenJDK 17 output from the `/usr/libexec/java_home -V` command. - [**Maven**](https://maven.apache.org/download.cgi): Used to dynamically download libraries and other required project dependencies. - For Home-brew users: - Install Maven using: `brew install maven` @@ -39,15 +45,9 @@ See the [wiki](https://github.com/NASA-AMMOS/common-workflow-service/wiki) for m - You will need to add your own truststore file to this path: `install/tomcat_lib/cws_truststore.jks` - See: https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html - **Store Your Keystore Password**: You will need to add your own creds file, which carries the keystore password, to this path: `~/.cws/creds` - - Set the permissions for the **~/.cws/** directory and **creds** file as Owner-Only. - - **~/.cws/** directory: `chmod 700 ~/.cws/` - - **~/.cws/creds** file: `chmod 600 ~/.cws/creds` -- **Java 11 JDK**: CWS only runs on JDK 11 now, but planning for JDK 17 soon. - - For Homebrew users: - - Install OpenJDK 11 using: `brew install openjdk@11` - - Check the exact version installed using `/usr/libexec/java_home -V` - - Add to your Shell startup (e.g. .zprofile): `export JAVA_HOME=$(/usr/libexec/java_home -v X.X.X)` - - Replace the X.X.X version above with the OpenJDK 11 output from the `/usr/libexec/java_home -V` command. + - Set the permissions for the **~/.cws/** directory and **creds** file as Owner-Only. + - **~/.cws/** directory: `chmod 700 ~/.cws/` + - **~/.cws/creds** file: `chmod 600 ~/.cws/creds` ### **Development Environment Configuration** diff --git a/cws-adaptation-engine/pom.xml b/cws-adaptation-engine/pom.xml index 1d7f6203..1dc22c83 100644 --- a/cws-adaptation-engine/pom.xml +++ b/cws-adaptation-engine/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-adaptation-engine diff --git a/cws-adaptation/pom.xml b/cws-adaptation/pom.xml index a6249342..15881661 100644 --- a/cws-adaptation/pom.xml +++ b/cws-adaptation/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-adaptation diff --git a/cws-core/pom.xml b/cws-core/pom.xml index f24f422a..ba2d75e1 100644 --- a/cws-core/pom.xml +++ b/cws-core/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-core diff --git a/cws-engine-service/pom.xml b/cws-engine-service/pom.xml index 315042e5..3bc75c28 100644 --- a/cws-engine-service/pom.xml +++ b/cws-engine-service/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-engine-service @@ -123,6 +123,19 @@ junit + + org.graalvm.js + js + 23.0.2 + runtime + + + org.graalvm.js + js-scriptengine + 23.0.2 + runtime + + org.apache.tomcat diff --git a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java index 94b97a08..cebb0c1a 100644 --- a/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java +++ b/cws-engine-service/src/main/java/jpl/cws/engine/WorkerService.java @@ -902,7 +902,8 @@ public boolean syncCounters(String reason) { public void setJobExecutorMaxPoolSize(Integer executorServiceMaxPoolSize, boolean doDbUpdate) { if (executorServiceMaxPoolSize != null) { try { - + // we are getting errors if we go beyond 10? + executorServiceMaxPoolSize = Math.min(10, executorServiceMaxPoolSize); // Log information about JMX remote interface if (System.getProperty("com.sun.management.jmxremote") == null) { log.warn("JMX remote appears to be disabled"); diff --git a/cws-engine/pom.xml b/cws-engine/pom.xml index 612377a9..8a55fe72 100644 --- a/cws-engine/pom.xml +++ b/cws-engine/pom.xml @@ -4,7 +4,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-engine @@ -24,6 +24,18 @@ gov.nasa.jpl.ammos.ids.cws cws-adaptation-engine + + org.graalvm.js + js + 23.0.2 + runtime + + + org.graalvm.js + js-scriptengine + 23.0.2 + runtime + diff --git a/cws-installer/pom.xml b/cws-installer/pom.xml index 332f7883..545c6caf 100644 --- a/cws-installer/pom.xml +++ b/cws-installer/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-installer diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java index 39725e13..7a377a19 100755 --- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java +++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java @@ -2504,9 +2504,6 @@ private static int validateKeystoreTruststore() { print(" Days Until expiration: " + numDays + " days"); print(""); return 0; - } else { - print(" [OK]"); - print(""); } } } catch (Exception e) { @@ -2517,7 +2514,9 @@ private static int validateKeystoreTruststore() { log.error("Keystore Storepass ERROR: " + e.getMessage()); return 1; } - return 0; // OK + print(" [OK]"); + print(""); + return 0; // no warnings } /** diff --git a/cws-service/pom.xml b/cws-service/pom.xml index 49d4311b..e2310289 100644 --- a/cws-service/pom.xml +++ b/cws-service/pom.xml @@ -4,7 +4,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-service diff --git a/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java b/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java index 83bd9e15..f43e8745 100644 --- a/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java +++ b/cws-service/src/main/java/jpl/cws/scheduler/Scheduler.java @@ -3,9 +3,7 @@ import static jpl.cws.core.db.SchedulerDbService.FAILED_TO_SCHEDULE; import static jpl.cws.core.db.SchedulerDbService.PENDING; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.UnsupportedEncodingException; +import java.io.*; import java.net.URLDecoder; import java.sql.Timestamp; import java.util.HashMap; @@ -129,8 +127,8 @@ public SchedulerJob scheduleProcess(String procDefKey, String procBusinessKey, String initiationKey, int priority) throws Exception { - log.trace("Scheduling process definition '" + procDefKey + "' ..."); - log.trace(" with variables=" + processVariables); + log.info("Scheduling process definition '" + procDefKey + "' ..."); + log.info(" with variables=" + processVariables); String schedulerJobUuid = null; boolean rowCreated = false; diff --git a/cws-tasks/pom.xml b/cws-tasks/pom.xml index 5a575d95..af11cd5a 100644 --- a/cws-tasks/pom.xml +++ b/cws-tasks/pom.xml @@ -4,7 +4,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-tasks diff --git a/cws-test/pom.xml b/cws-test/pom.xml index 4c388439..6f189183 100644 --- a/cws-test/pom.xml +++ b/cws-test/pom.xml @@ -3,7 +3,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-test diff --git a/cws-test/src/test/resources/configure_with_jacoco.sh b/cws-test/src/test/resources/configure_with_jacoco.sh index 1f6c8156..e62af2a5 100755 --- a/cws-test/src/test/resources/configure_with_jacoco.sh +++ b/cws-test/src/test/resources/configure_with_jacoco.sh @@ -48,13 +48,13 @@ else exit 1 fi -if [[ "$java_version" > "11" && "$java_version" < "12" ]]; then - echo " Java version == 11x [OK]" +if [[ "$java_version" > "17" && "$java_version" < "18" ]]; then + echo " Java version == 17x [OK]" else echo " +-------+----------------------------------------------------" echo " | ERROR | " echo " +-------+ " - echo " | Java version is less than 11. Must run with Java 11x " + echo " | Java version is not 17. Must run with Java 17x " echo " | Aborting program... " echo "--------------------------------------------------------------" exit 1 @@ -264,7 +264,7 @@ rm -f ${ROOT}/config/my.cnf sleep 1 if [ "$RECONFIGURE" = true ]; then - ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure + ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller --reconfigure else - ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.2-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller + ${JAVA_HOME}/bin/java -classpath "./installer/*" -javaagent:./server/apache-tomcat-${TOMCAT_VER}/lib/org.jacoco.agent-0.8.7-runtime.jar=destfile=./installer-jacoco.exec,append=false jpl.cws.task.CwsInstaller fi diff --git a/cws-ui/pom.xml b/cws-ui/pom.xml index 18693985..b986c342 100644 --- a/cws-ui/pom.xml +++ b/cws-ui/pom.xml @@ -5,7 +5,7 @@ gov.nasa.jpl.ammos.ids.cws common-workflow-service - 2.5.0 + 2.6.0-pre.1 cws-ui diff --git a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml index 2cac8eba..c63e7d1e 100644 --- a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml +++ b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml @@ -15,7 +15,9 @@ - + + + + 2.6.0-pre.1 pom cws CWS @@ -47,8 +47,8 @@ 2.8.9 2.2.220 - 0.8.2 - 11 + 0.8.7 + 17 1.4.7 2.6 1.1 @@ -77,11 +77,11 @@ 2.17.1 2.17.1 false - 5.2.20.RELEASE + 5.3.31 2.22.2 9.0.75 4.0.3 - 3.17 + 4.24 2.6.2 @@ -109,7 +109,7 @@ maven2 - http://repo1.maven.org/maven2 + https://repo1.maven.org/maven2 repository.jboss.org-public @@ -192,6 +192,19 @@ pom + + org.graalvm.js + js + 23.0.2 + runtime + + + org.graalvm.js + js-scriptengine + 23.0.2 + runtime + + org.camunda.bpm camunda-engine @@ -658,7 +671,13 @@ + + org.apache.maven.plugins + maven-war-plugin + 3.3.1 + + diff --git a/utils.sh b/utils.sh index 44520510..ff798ae9 100755 --- a/utils.sh +++ b/utils.sh @@ -5,7 +5,7 @@ # Shell utility functions and environment settings used throughout CWS setup scripts # Update versions as necessary -export CWS_VER='2.5.0' # update this each CWS release +export CWS_VER='2.6.0-pre.1' # update this each CWS release export CAMUNDA_VER='7.20.0' export TOMCAT_VER='9.0.75' export LOGSTASH_VER='8.8.0' @@ -152,10 +152,10 @@ function check_java_requirements () { exit 1 fi - if [[ "${JAVA_PATH_VERSION}" > "11" && "${JAVA_PATH_VERSION}" < "12" ]]; then - print " Java version == 11x [OK]" + if [[ "${JAVA_PATH_VERSION}" > "17" && "${JAVA_PATH_VERSION}" < "18" ]]; then + print " Java version == 17x [OK]" else - print " ERROR: Java version is ${JAVA_PATH_VERSION}. CWS only supports Java version 11x." + print " ERROR: Java version is ${JAVA_PATH_VERSION}. CWS only supports Java version 17x." exit 1 fi