0

 nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 540
        at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.session.jdbc.JdbcIndexedSessionRepository.deserialize(JdbcIndexedSessionRepository.java:597) ~[spring-session-jdbc-2.4.1.jar!/:2.4.1]
        at org.springframework.session.jdbc.JdbcIndexedSessionRepository.access$1900(JdbcIndexedSessionRepository.java:131) ~[spring-session-jdbc-2.4.1.jar!/:2.4.1]
        at org.springframework.session.jdbc.JdbcIndexedSessionRepository$SessionResultSetExtractor.lambda$extractData$0(JdbcIndexedSessionRepository.java:863) ~[spring-session-jdbc-2.4.1.jar!/:2.4.1]
        at org.springframework.session.jdbc.JdbcIndexedSessionRepository$4.get(JdbcIndexedSessionRepository.java:619) ~[spring-session-jdbc-2.4.1.jar!/:2.4.1]
        at org.springframework.session.jdbc.JdbcIndexedSessionRepository$JdbcSession.getAttribute(JdbcIndexedSessionRepository.java:694) ~[spring-session-jdbc-2.4.1.jar!/:2.4.1]
        at org.springframework.session.security.SpringSessionBackedSessionInformation.resolvePrincipal(SpringSessionBackedSessionInformation.java:68) ~[spring-session-core-2.4.1.jar!/:2.4.1]
        at org.springframework.session.security.SpringSessionBackedSessionInformation.<init>(SpringSessionBackedSessionInformation.java:50) ~[spring-session-core-2.4.1.jar!/:2.4.1]
        at org.springframework.session.security.SpringSessionBackedSessionRegistry.getAllSessions(SpringSessionBackedSessionRegistry.java:69) ~[spring-session-core-2.4.1.jar!/:2.4.1]
        at org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy.onAuthentication(ConcurrentSessionControlAuthenticationStrategy.java:97) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy.onAuthentication(CompositeSessionAuthenticationStrategy.java:82) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) ~[spring-security-web-5.4.1.jar!/:5.4.1]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:141) ~[spring-session-core-2.4.1.jar!/:2.4.1]
        at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82) ~[spring-session-core-2.4.1.jar!/:2.4.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.1.jar!/:5.3.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.39.jar!/:9.0.39]
        at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
Caused by: org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 540
        at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:78) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:36) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.core.convert.support.GenericConversionService$ConverterAdapter.convert(GenericConversionService.java:386) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) ~[spring-core-5.3.1.jar!/:5.3.1]
        ... 61 common frames omitted
Caused by: java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 540
        at java.base/java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:722) ~[na:na]
        at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2022) ~[na:na]
        at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1872) ~[na:na]
        at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2179) ~[na:na]
        at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1689) ~[na:na]
        at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:495) ~[na:na]
        at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:453) ~[na:na]
        at org.springframework.core.serializer.DefaultDeserializer.deserialize(DefaultDeserializer.java:72) ~[spring-core-5.3.1.jar!/:5.3.1]
        at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:73) ~[spring-core-5.3.1.jar!/:5.3.1]
        ... 64 common frames omitted

We are upgrading the camunda from 7.10 to 7.15 version. We are using org.apache.commons.lang package in the code. After the upgrade, org.apache.commons.lang was throwing an error- "package org.apache.commons.lang does not exist"

after replacing lang with lang3, build was successful. but we are getting runtime error-"org.springframework.core.convert.ConversionFailedException: Failed to convert from type [byte[]] to type [java.lang.Object] for value"

Please help.

Nikhil
  • 11
  • 1

1 Answers1

0

You are upgrading quite a few versions. As part of this upgrade also the Spring version and all its dependencies will be upgraded. Compare to a plain vanilla Camunda 7.15 installation and check if if all your library version numbers match. Of course you can also rely on Maven to do this. The complete dependency tree for Camunda 7.15.0 on Spring Boot is:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ my-project ---
[INFO] com.example.workflow:my-project:jar:1.0.0-SNAPSHOT
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:jar:7.15.0:compile
[INFO] |  +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:jar:7.15.0:compile
[INFO] |  |  +- org.camunda.bpm:camunda-engine-spring:jar:7.15.0:compile
[INFO] |  |  |  +- org.camunda.bpm:camunda-engine:jar:7.15.0:compile
[INFO] |  |  |  |  +- org.camunda.bpm.model:camunda-bpmn-model:jar:7.15.0:compile
[INFO] |  |  |  |  |  \- org.camunda.bpm.model:camunda-xml-model:jar:7.15.0:compile
[INFO] |  |  |  |  +- org.camunda.bpm.model:camunda-cmmn-model:jar:7.15.0:compile
[INFO] |  |  |  |  +- org.camunda.bpm.dmn:camunda-engine-dmn:jar:7.15.0:compile
[INFO] |  |  |  |  |  +- org.camunda.bpm.model:camunda-dmn-model:jar:7.15.0:compile
[INFO] |  |  |  |  |  +- org.camunda.bpm.dmn:camunda-engine-feel-api:jar:7.15.0:compile
[INFO] |  |  |  |  |  +- org.camunda.bpm.dmn:camunda-engine-feel-juel:jar:7.15.0:compile
[INFO] |  |  |  |  |  +- org.camunda.bpm.dmn:camunda-engine-feel-scala:jar:7.15.0:compile
[INFO] |  |  |  |  |  \- org.camunda.feel:feel-engine:jar:scala-shaded:1.13.1:compile
[INFO] |  |  |  |  +- org.camunda.commons:camunda-commons-typed-values:jar:7.15.0:compile
[INFO] |  |  |  |  +- org.mybatis:mybatis:jar:3.5.6:compile
[INFO] |  |  |  |  +- joda-time:joda-time:jar:2.1:compile
[INFO] |  |  |  |  +- org.camunda.connect:camunda-connect-core:jar:1.5.2:compile
[INFO] |  |  |  |  \- org.camunda.connect:camunda-connect-connectors-all:jar:1.5.2:runtime
[INFO] |  |  |  \- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  |  |     \- commons-pool:commons-pool:jar:1.6:compile
[INFO] |  |  +- org.springframework:spring-context:jar:5.3.4:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:5.3.4:compile
[INFO] |  |  +- org.springframework:spring-orm:jar:5.3.4:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-loader-tools:jar:2.4.3:compile
[INFO] |  |  |  \- org.apache.commons:commons-compress:jar:1.20:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.3:compile
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.11:compile
[INFO] |  |  \- com.fasterxml.uuid:java-uuid-generator:jar:3.2.0:compile
[INFO] |  +- org.camunda.bpm:camunda-engine-rest-jaxrs2:jar:7.15.0:compile
[INFO] |  |  +- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] |  |  +- commons-io:commons-io:jar:2.8.0:compile
[INFO] |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.11.4:compile
[INFO] |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.11.4:compile
[INFO] |  |  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.11.4:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.4:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.4:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.11.4:compile
[INFO] |  \- org.springframework.boot:spring-boot-starter-jersey:jar:2.4.3:compile
[INFO] |     +- org.springframework.boot:spring-boot-starter-json:jar:2.4.3:compile
[INFO] |     |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4:compile
[INFO] |     |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4:compile
[INFO] |     |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4:compile
[INFO] |     +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.4.3:compile
[INFO] |     |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.43:compile
[INFO] |     |  +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] |     |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.43:compile
[INFO] |     +- org.springframework.boot:spring-boot-starter-validation:jar:2.4.3:compile
[INFO] |     |  \- org.hibernate.validator:hibernate-validator:jar:6.1.7.Final:compile
[INFO] |     |     +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] |     |     \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |     +- org.springframework:spring-web:jar:5.3.4:compile
[INFO] |     +- org.glassfish.jersey.core:jersey-server:jar:2.32:compile
[INFO] |     |  +- org.glassfish.jersey.core:jersey-common:jar:2.32:compile
[INFO] |     |  |  +- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:compile
[INFO] |     |  |  \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] |     |  +- org.glassfish.jersey.core:jersey-client:jar:2.32:compile
[INFO] |     |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[INFO] |     |  +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.32:compile
[INFO] |     |  +- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[INFO] |     |  +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] |     |  \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |     |     \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] |     +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.32:compile
[INFO] |     +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.32:compile
[INFO] |     +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.32:compile
[INFO] |     +- org.glassfish.jersey.ext:jersey-spring5:jar:2.32:compile
[INFO] |     |  +- org.glassfish.jersey.inject:jersey-hk2:jar:2.32:compile
[INFO] |     |  |  +- org.glassfish.hk2:hk2-locator:jar:2.6.1:compile
[INFO] |     |  |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1:compile
[INFO] |     |  |  \- org.javassist:javassist:jar:3.25.0-GA:compile
[INFO] |     |  +- org.glassfish.hk2:hk2:jar:2.6.1:compile
[INFO] |     |  |  +- org.glassfish.hk2:hk2-utils:jar:2.6.1:compile
[INFO] |     |  |  +- org.glassfish.hk2:hk2-api:jar:2.6.1:compile
[INFO] |     |  |  +- org.glassfish.hk2:hk2-core:jar:2.6.1:compile
[INFO] |     |  |  +- org.glassfish.hk2:hk2-runlevel:jar:2.6.1:compile
[INFO] |     |  |  \- org.glassfish.hk2:class-model:jar:2.6.1:compile
[INFO] |     |  |     +- org.ow2.asm:asm:jar:7.1:compile
[INFO] |     |  |     +- org.ow2.asm:asm-analysis:jar:7.1:compile
[INFO] |     |  |     +- org.ow2.asm:asm-commons:jar:7.1:compile
[INFO] |     |  |     +- org.ow2.asm:asm-tree:jar:7.1:compile
[INFO] |     |  |     \- org.ow2.asm:asm-util:jar:7.1:compile
[INFO] |     |  \- org.glassfish.hk2:spring-bridge:jar:2.6.1:compile
[INFO] |     \- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.32:compile
[INFO] |        \- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.32:compile
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:jar:7.15.0:compile
[INFO] |  +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-core:jar:7.15.0:compile
[INFO] |  |  +- org.camunda.bpm.webapp:camunda-webapp:jar:classes:7.15.0:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-starter-web:jar:2.4.3:compile
[INFO] |  |     \- org.springframework:spring-webmvc:jar:5.3.4:compile
[INFO] |  \- org.camunda.bpm.webapp:camunda-webapp-webjar:jar:7.15.0:compile
[INFO] +- org.camunda.bpm:camunda-engine-plugin-spin:jar:7.15.0:compile
[INFO] |  \- org.camunda.spin:camunda-spin-core:jar:1.10.1:compile
[INFO] +- org.camunda.spin:camunda-spin-dataformat-all:jar:1.10.1:compile
[INFO] |  +- org.camunda.commons:camunda-commons-logging:jar:1.10.0:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] |  \- org.camunda.commons:camunda-commons-utils:jar:1.10.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.4.3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.4.3:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:2.4.3:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.3:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  +- org.springframework:spring-core:jar:5.3.4:compile
[INFO] |  |  |  \- org.springframework:spring-jcl:jar:5.3.4:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.3.4:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.3.4:compile
[INFO] |  +- org.springframework.security:spring-security-config:jar:5.4.5:compile
[INFO] |  |  \- org.springframework.security:spring-security-core:jar:5.4.5:compile
[INFO] |  \- org.springframework.security:spring-security-web:jar:5.4.5:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.3.4:compile
[INFO] +- com.h2database:h2:jar:1.4.200:compile
[INFO] \- org.springframework.boot:spring-boot-starter-jdbc:jar:2.4.3:compile
[INFO]    +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO]    \- org.springframework:spring-jdbc:jar:5.3.4:compile

The updated stacktrace shows:

Caused by: java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 510, local class serialVersionUID = 540

From this I conclude that your project also uses Spring Security. You seem to be using incompatible library versions. This hints that:

Spring Session cannot handle Spring Boot 2.3 and 2.4 sessions in parallel, because the serialization of SecurityContextImpl is whether backward nor forward compatible:

Bottom line: Check all library versions you are using and ensure the versions, esp. those of Spring Security and Spring, are compatible.

https://start.camunda.com/ can be used to create an example project containing the compatible version of Camunda Spring Boot Starters, Spring Boot, Spring Security. I have updated the dependency tree above to also include Spring Security dependencies.

rob2universe
  • 7,059
  • 39
  • 54
  • I have updated the POM file like below. still im getting the error. 7.15.0 2.4.3 .... org.springframework.boot spring-boot-starter-security ${spring-boot.version} – Nikhil Aug 18 '21 at 08:06
  • An approach to identify differences can be: start with a working plain vanilla project from start.camunda.com. Then start adding you process specifics to is (e.g. SSO). After every step see if it breaks. If it breaks you know where to fix. If it doesn't you ultimately end up with the final result. – rob2universe Aug 18 '21 at 08:34