Skip to content

DeploymentRestServiceInteractionTest fails with ClassCastException after Resteasy 7.0 upgrade #2794

@DieterMayerOSS

Description

@DieterMayerOSS

Description

After the upgrade to Resteasy 7.0 (commit b6c1982 "deps: Raise Resteasy to 7.0"), mvn clean verify on the operaton-engine-rest-core module fails with:
java.lang.ClassCastException: class camundajar.impl.scala.collection.immutable.Map$Map3
cannot be cast to class java.util.LinkedHashMap
(camundajar.impl.scala.collection.immutable.Map$Map3 is in unnamed module of loader 'app';
java.util.LinkedHashMap is in module java.base of loader 'bootstrap')
at org.operaton.bpm.engine.rest.DeploymentRestServiceInteractionTest.verifyDeploymentResources(DeploymentRestServiceInteractionTest.java:2128)
at org.operaton.bpm.engine.rest.DeploymentRestServiceInteractionTest.testGetDeploymentResources(DeploymentRestServiceInteractionTest.java:164)

Root Cause

Resteasy 7.0 appears to use a different JSON deserialization path that returns a scala.collection.immutable.Map (shaded as camundajar.impl.scala.collection.immutable.Map) instead of java.util.LinkedHashMap. The test at line 2128 hard-casts to LinkedHashMap:

Environment

  • OS: Windows 11
  • Java: 21.0.10 (Temurin)
  • Maven: 3.9.9
  • Branch: main (commit d90e5ed / after the Resteasy upgrade)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions