Pega 8.8.2 - Error kotlin.NoWhenBranchMatchedException received when deploying prreadstream.jar on DB2

I created the file udfdeploy.properties with the below lines in the udf folder:

udb.jdbc.class=com.ibm.db2.jcc.DB2Driver

pega.udb.url=jdbc:db2://172.40.130.101:50000/pegadb

pega.udb.username=pegaadmin

pega.udb.password=password_of_pegaadmin

pega.udb.schema=pegadata

Also I kept the below files inside the udf folder:

  • db2jcc4.jar
  • prdeploy.jar
  • prreadstream.jar

Created a folder named logs inside the udf folder.

I ran the below command:

java -cp “prdeploy.jar:db2jcc4.jar” com.pega.pegarules.install.DatabaseLibraryLoader --config=“udfdeploy.properties” --profile=pega.udb “prreadstream.jar”

I am getting the following error:

Exception in thread “main” java.lang.NoClassDefFoundError: kotlin.NoWhenBranchMatchedException

@DebrajB16819133

I downloaded the below jar files from https://jar-download.com/artifact-search/kotlin-stdlib with all dependencies:

• annotations-13.0.jar

• kotlin-stdlib-1.8.21.jar

• kotlin-stdlib-common-1.8.21.jar

Then placed these jar files inside the udf folder.

I ran the below command to load prreadstream.jar into the pegadata schema:

java -cp “prdeploy.jar:db2jcc4.jar:kotlin-stdlib-1.8.21.jar:kotlin-stdlib-common-1.8.21.jar” com.pega.pegarules.install.DatabaseLibraryLoader --config=“udfdeploy.properties” --profile=pega.udb “prreadstream.jar”

The command ran successfully and loaded prreadstream.jar into the pegadata schema.

Then changed the pegadata schema to pegarules inside udfdeploy.properties file, “pega.udb.schema=pegarules” and ran the above command again.