Hey !
I have a problem with a librairy java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/kotlin/ExtensionsKt
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/kotlin/ExtensionsKt
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at org.camunda.bpm.extension.rest.config.CamundaFeignExceptionDecoder.decodeException(FeignErrorDecoderConfiguration.kt:84)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at org.camunda.bpm.extension.rest.config.FeignErrorDecoderConfiguration.errorDecoder$lambda-0(FeignErrorDecoderConfiguration.kt:61)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at com.sun.proxy.$Proxy106.correlateMessage(Unknown Source)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at org.camunda.bpm.extension.rest.impl.builder.DelegatingMessageCorrelationBuilder.correlateAll(DelegatingMessageCorrelationBuilder.kt:211)
WANC_nso-worker.2.460ftv4sgdln@dvwanas00b00022 | at com.myproject.service.AbstractNsoService.sendMessage(AbstractNsoService.java:554)
This is one of the camunda libraries that uses a Kotlin objectMapper to communicate between camunda ↔ external_task service during a correlateAll() message
Camunda therefore tries to find this Mapper object, which is not defined anywhere because it has not been imported. The camunda dependencies do not embed a library that is needed when it should.
cf. classe FeignErrorDecodeerConfiguration.kt
internal data class CamundaFeignExceptionDecoder(val response: Response) {
/**
- Tries to create an instance of exception deduced from status code.
- @return exception or
null
if decoding was not possible.
*/
fun decodeException(): Exception? {
return try {
val response = jacksonObjectMapper().readValue(response.body().asInputStream(), CamundaHttpExceptionReason::class.java)
constructExceptionInstance(response)
?: fromMessage(response.message)?.let {
constructExceptionInstance(it)
}
} catch (e: IOException) {
null
}
}
import com.fasterxml.jackson.module.kotlin*.jacksonObjectMapper* => is not imported !
why camunda uses a Kotlin objectMapper while we provide a JAVA @Bean ObjectMapper in our configuration?
The “MessageCorrelationBuilder” class interface uses the “DelegatingMessageCorrelationBuilder” implementation class (in kotlin) when it should use the JAVA class “MessageCorrelationBuilderImpl”!
How i can configure my springboot application to choice the right implementation class ?
Thanks !
Hi Camunda team, what is the solution for above error ?
I’m getting the similar error, In my case it was working fine and suddenly I’m getting below error. Could you please suggest
2023-03-08 10:18:06.280 ERROR [https-jsse-nio-9310-exec-4] ERROR [collateralapi,31b84fc274332558,373bd0ce611d2529] - Caught generic exception
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/kotlin/ExtensionsKt
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1086)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at au.com.ing.microservice.commons.rest.server.security.AuthenticationFilter.handleValidRequest(AuthenticationFilter.java:77)
at au.com.ing.microservice.commons.rest.server.security.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:54)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.cloud.sleuth.instrument.web.servlet.TracingFilter.doFilter(TracingFilter.java:68)
at org.springframework.cloud.sleuth.autoconfig.instrument.web.TraceWebServletConfiguration$LazyTracingFilter.doFilter(TraceWebServletConfiguration.java:131)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.springframework.cloud.sleuth.instrument.web.tomcat.TraceValve.invoke(TraceValve.java:103)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
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 au.com.ing.microservice.collateralapi.infrastructure.client.WorkbenchServiceClient.startProcessInstanceByKey(WorkbenchServiceClient.java:56)
at au.com.ing.microservice.collateralapi.domain.service.CollateralService.createCollateral(CollateralService.java:96)
at au.com.ing.microservice.collateralapi.resource.CollateralResource.createCollateral(CollateralResource.java:50)
at au.com.ing.microservice.collateralapi.resource.CollateralResource$$FastClassBySpringCGLIB$$29713950.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at au.com.ing.microservice.collateralapi.resource.CollateralResource$$EnhancerBySpringCGLIB$$635cd412.createCollateral(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
... 98 common frames omitted
2023-03-08 10:18:06.292 PAYLOAD [commons-logging-8] INFO [collateralapi,31b84fc274332558,9e5d7adb1cf2188b] - Outbound Response: {"errors":[{"code":1,"message":"The application has encountered an unknown error"}]}
@hassang & Camunda team, any update on this? we are blocked and need your help
@Ingo_Richtsmeier : Could you please help us on this, how to fix tis issue.
Hi @Ramanaiah,
sorry, I have no clue about this special case.
From the stack trace, I see that you use Kotlin and the GitHub - camunda-community-hub/camunda-platform-7-rest-client-spring-boot: Camunda REST client for Java Spring Boot Projects, implemented using Feign.
Maybe you can file an issue in the github repo to get the attention of the maintainers?
Hope this helps, Ingo