Exception while startProcessInstanceByKey in Camunda RemoteRuntimeService

Hi Camunda Team,
I’m getting below error while starting the process instance by key via API in Camunda RemoteRuntimeService.

2023-03-08 16:28:32.497 ERROR [https-jsse-nio-9310-exec-7] ERROR [collateralapi,2cb846125b8e141d,0eb6cea5a9cff1f8] - Caught generic exception
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/kotlin/ExtensionsKt
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/kotlin/ExtensionsKt
	at org.camunda.bpm.extension.rest.config.CamundaFeignExceptionDecoder.decodeException(FeignErrorDecoderConfiguration.kt:84)
	at org.camunda.bpm.extension.rest.config.FeignErrorDecoderConfiguration.errorDecoder$lambda-0(FeignErrorDecoderConfiguration.kt:61)
	at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:98)
	at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:141)
	at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91)
	at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
	at org.springframework.cloud.openfeign.FeignCachingInvocationHandlerFactory$1.proceed(FeignCachingInvocationHandlerFactory.java:66)
	at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:54)
	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:351)
	at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64)
	at org.springframework.cloud.openfeign.FeignCachingInvocationHandlerFactory.lambda$create$1(FeignCachingInvocationHandlerFactory.java:53) 
    at

> com.sun.proxy.$Proxy256.startProcessByKey(Unknown Source)

at org.camunda.bpm.extension.rest.impl.RemoteRuntimeService.doStartProcessInstanceByKey(RemoteRuntimeService.kt:175)
	at org.camunda.bpm.extension.rest.impl.RemoteRuntimeService.doStartProcessInstanceByKey$default(RemoteRuntimeService.kt:169)
	at org.camunda.bpm.extension.rest.impl.RemoteRuntimeService.startProcessInstanceByKey(RemoteRuntimeService.kt:134)
	at com.infrastructure.client.WorkbenchServiceClient.startProcessInstanceByKey(WorkbenchServiceClient.java:56)
	at com.infrastructure.domain.service.CollateralService.createCollateral(CollateralService.java:96)
	at com.infrastructure.resource.CollateralResource.createCollateral(CollateralResource.java:50)

Could you please help me on this how to resolve this.

Cheers,
Ramanaiah Pirla

@Ramanaiah Could you share the pom.xml file?

Here it is.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    

    <artifactId>collateral</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>${packaging.type}</packaging>

    <properties>
        <diffprop.haltOnFailure>false</diffprop.haltOnFailure>
        <modelmapper.version>2.3.5</modelmapper.version>
        <camunda.version>7.13.0-ee</camunda.version>
        <camunda.rest.client.starter.version>0.0.6</camunda.rest.client.starter.version>
        <camunda.engine.version>7.17.0</camunda.engine.version>
        <version.powermock>2.0.7</version.powermock>
        <jacoco.excludes>domain/entity/**</jacoco.excludes>
    </properties>

    <dependencies>
       
        <!-- Third Party Dependencies -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.modelmapper</groupId>
            <artifactId>modelmapper</artifactId>
            <version>${modelmapper.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>1.6.11</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-webmvc-core</artifactId>
            <version>1.6.11</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-security</artifactId>
            <version>1.6.11</version>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-core</artifactId>
            <version>2.2.2</version>
        </dependency>

        <dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-bom</artifactId>
            <version>${camunda.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.camunda.bpm.extension.rest</groupId>
            <artifactId>camunda-rest-client-spring-boot-starter</artifactId>
            <version>${camunda.rest.client.starter.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.camunda.bpm</groupId>
                    <artifactId>camunda-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-engine</artifactId>
            <version>${camunda.engine.version}</version>
        </dependency>

        <!-- Third Party Test Dependencies -->
        <dependency>
            <groupId>au.com.dius.pact.provider</groupId>
            <artifactId>junit5spring</artifactId>
            <version>4.2.20</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>${version.powermock}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.jsonschema2pojo</groupId>
                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
                    <targetPackage>domain.entity</targetPackage>
                    <generateBuilders>true</generateBuilders>
                    <includeJsr303Annotations>true</includeJsr303Annotations>
                    <dateTimeType>java.time.LocalDateTime</dateTimeType>
                    <dateType>java.time.LocalDate</dateType>
                    <useBigDecimals>true</useBigDecimals>
                    <includeDynamicBuilders>true</includeDynamicBuilders>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-env-conf</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/conf</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>conf/src/main/environments/env</directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <descriptor>schema-assembly.xml</descriptor>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation> 
            <dependencies>
                <!-- Third Party Dependencies -->
                <dependency>
                    <groupId>com.microsoft.sqlserver</groupId>
                    <artifactId>mssql-jdbc</artifactId>
                </dependency>
            </dependencies>
        </profile>        
        <profile>
            <id>local</id>           
            <dependencies>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-local-conf</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.directory}/conf</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>conf/src/main/environments/local</directory>
                                            <includes>
                                                <include>**/*</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                    <overwrite>true</overwrite>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>            
        </profile>
    </profiles>
</project>

@Ramanaiah Try adding this dependency into your pom.xml file

<dependency>
    <groupId>com.fasterxml.jackson.module</groupId>
    <artifactId>jackson-module-kotlin</artifactId>
    <version> /* < provide the required version > */ </version>
</dependency>

Ok will try that

@aravindhrs Thanks for the quick help, found the solution.

Cheers,
Ramanaiah Pirla