diff --git a/.github/workflows/camunda.yml b/.github/workflows/camunda.yml index b67558a8..18a81e6b 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 0af163f8..26305a4c 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 851afce1..8e81e1f9 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-adaptation-engine</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-adaptation</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-core</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-engine-service</artifactId> @@ -123,6 +123,19 @@ <artifactId>junit</artifactId> </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js-scriptengine</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> + <!-- IS THIS NEEDED?? --> <dependency> <groupId>org.apache.tomcat</groupId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-engine</artifactId> @@ -24,6 +24,18 @@ <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>cws-adaptation-engine</artifactId> </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js-scriptengine</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> </dependencies> </profile> </profiles> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-installer</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-service</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-tasks</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-test</artifactId> 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 @@ <parent> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version><!-- update this each CWS release --> + <version>2.6.0-pre.1</version><!-- update this each CWS release --> </parent> <artifactId>cws-ui</artifactId> 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 @@ <context:property-placeholder location="classpath:cws-ui.properties"/> - <mvc:annotation-driven /> + <mvc:annotation-driven> + <mvc:path-matching suffix-pattern="true" /> + </mvc:annotation-driven> <!-- <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" > diff --git a/install/cws_camunda-bpm-tomcat-7.20.0.zip b/install/cws_camunda-bpm-tomcat-7.20.0.zip index cb31e4e5..41f19d7a 100644 Binary files a/install/cws_camunda-bpm-tomcat-7.20.0.zip and b/install/cws_camunda-bpm-tomcat-7.20.0.zip differ diff --git a/install/docker/console-db-es-ls-kibana/docker-compose.yml b/install/docker/console-db-es-ls-kibana/docker-compose.yml index 5b65c9c0..c9cd71de 100644 --- a/install/docker/console-db-es-ls-kibana/docker-compose.yml +++ b/install/docker/console-db-es-ls-kibana/docker-compose.yml @@ -89,7 +89,7 @@ services: labels: com.example.service: "cws-server" com.example.description: "Common Workflow Service" - image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release + image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release depends_on: - db - es @@ -121,7 +121,7 @@ services: labels: com.example.service: "cws-worker1" com.example.description: "Common Workflow Service" - image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release + image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release depends_on: - db - es diff --git a/install/docker/cws-image/build.sh b/install/docker/cws-image/build.sh index 2892b705..75d9dd93 100755 --- a/install/docker/cws-image/build.sh +++ b/install/docker/cws-image/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -ver='2.5.0' # update this each CWS release +ver='2.6.0-pre.1' # update this each CWS release # Rebuild cws tar-ball ROOT=$(pwd) diff --git a/install/docker/worker-ls/docker-compose.yml b/install/docker/worker-ls/docker-compose.yml index cc7ff174..8b552196 100644 --- a/install/docker/worker-ls/docker-compose.yml +++ b/install/docker/worker-ls/docker-compose.yml @@ -28,7 +28,7 @@ services: labels: com.example.service: "cws-worker2" com.example.description: "Common Workflow Service" - image: nasa-ammos/common-workflow-service:2.5.0 # update this each CWS release + image: nasa-ammos/common-workflow-service:2.6.0-pre.1 # update this each CWS release #depends_on: # - logstash hostname: cws-worker2 diff --git a/pom.xml b/pom.xml index 315971a0..3149aac6 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>gov.nasa.jpl.ammos.ids.cws</groupId> <artifactId>common-workflow-service</artifactId> - <version>2.5.0</version> <!-- update this each CWS release --> + <version>2.6.0-pre.1</version> <!-- update this each CWS release --> <packaging>pom</packaging> <name>cws</name> <description>CWS</description> @@ -47,8 +47,8 @@ <gson.version>2.8.9</gson.version> <h2.version>2.2.220</h2.version> <!-- <httpclient.version>4.3</httpclient.version> --> - <jacoco.version>0.8.2</jacoco.version> - <java.version>11</java.version> + <jacoco.version>0.8.7</jacoco.version> + <java.version>17</java.version> <javax.mail.version>1.4.7</javax.mail.version> <jersey-client.version>2.6</jersey-client.version> <jms.version>1.1</jms.version> @@ -77,11 +77,11 @@ <log4j.version>2.17.1</log4j.version> <slf4j-log4j2-bind.version>2.17.1</slf4j-log4j2-bind.version> <skip.integration.tests>false</skip.integration.tests> - <spring.framework.version>5.2.20.RELEASE</spring.framework.version> + <spring.framework.version>5.3.31</spring.framework.version> <surefire.version>2.22.2</surefire.version> <tomcat-catalina.version>9.0.75</tomcat-catalina.version> <urlrewritefilter.version>4.0.3</urlrewritefilter.version> - <xbean-spring.version>3.17</xbean-spring.version> + <xbean-spring.version>4.24</xbean-spring.version> <xmlunit.version>2.6.2</xmlunit.version> </properties> @@ -109,7 +109,7 @@ <repositories> <repository> <id>maven2</id> - <url>http://repo1.maven.org/maven2</url> + <url>https://repo1.maven.org/maven2</url> </repository> <repository> <id>repository.jboss.org-public</id> @@ -192,6 +192,19 @@ <type>pom</type> </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.graalvm.js</groupId> + <artifactId>js-scriptengine</artifactId> + <version>23.0.2</version> + <scope>runtime</scope> + </dependency> + <dependency> <groupId>org.camunda.bpm</groupId> <artifactId>camunda-engine</artifactId> @@ -658,7 +671,13 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>3.3.1</version> + </plugin> </plugins> + </build> </project> diff --git a/utils.sh b/utils.sh index 9012441a..5d577364 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.12.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