Skip to content

Possible NoClassDefFoundError when loading FEEL engine #2875

Closed

Description

@patptrs

Describe the bug

Operaton release 2.1.0 contains jackson-module-scala_2.13-2.21.2.jar as a dependency originating from feel-engine-1.21.0
This was introduced to camunda-feel-engine with camunda/feel-scala#1031

The classes in this jar file are actually shaded in feel-engine-1.21.0-scala-shaded.jar and properly reference the shaded library classes of scala-library which are prefixed with the package "camundajar.impl.". The class files in jackson-module-scala_2.13-2.21.2.jar however reference the unshaded classes from the original scala library.

Because the shaded jackson classes are not properly prefixed with a shade package and use the same package names as the original ones, if the original classes are loaded first, a NoClassDefFoundError may occur when classes from feel-engine are loaded.

I think that, similar to scala-library, jackson-module-scala should be excluded from the dependency tree of operaton-engine.

To Reproduce

Steps to reproduce the behavior:

  1. Start an application using operaton-engine 2.1.0 where the classpath orders jackson-module-scala_2.13-2.21.2.jar before feel-engine-1.21.0-scala-shaded.jar
  2. A NoClassDefFoundError occurs when instantiating a DmnEngine using FEEL: java.lang.NoClassDefFoundError: scala/collection/immutable/Seq

Expected behavior

Shaded classes should be loaded from feel-engine-1.21.0-scala-shaded.jar

Additional context

As a workaround I manually removed jackson-module-scala from the classpath when running operaton.

Activity

  1. added theissue type on Apr 30, 2026
  2. github-actions commented on Apr 30, 2026

    @github-actions
    Contributor

    Hey @patptrs! 🎉

    Thanks for opening your first issue. We really appreciate your interest and contribution. 🙌

    👉 Before moving forward, please make sure to check out our Contributing Guidelines and the Code of Conduct. This helps us keep everything clear and consistent.

    If you enjoy this project, consider giving it a star ⭐️ — we’d really appreciate that.

    Looking forward to your input! 🚀

  3. kthoms commented on May 4, 2026

    @kthoms
    Contributor

    Thank you for your detailed explanation. This will be helpful to track down the bug.

    We can see that the dependency hierarchy is

    operaton-engine-dmn -> operaton-engine-feel-scala -> org.camunda.feel:feel-engine -> com.fasterxml.jackson.module:jackson-module-scala
    
    Image

    jackson-module-scala_2.13-2.21.2.jar does not contain scala classes with package prefix scala.*
    Image

    feel-engine-1.21.0-scala-shaded.jar contains shaded scala classes for package prefix camundajar.impl.scala.
    Image

    Notable is that the 2 jars

    • feel-engine-1.21.0-scala-shaded.jar
    • jackson-module-scala_2.13-2.21.2.jar
      both contain classes for package com.fasterxml.jackson.module.scala.

    So your analysis is correct: If jackson-module-scala_2.13-2.21.2.jar is on the classpath before feel-engine-1.21.0-scala-shaded.jar, the Jackson classes cannot load the Scala classes.

    The final distribution should include feel-engine-1.21.0-scala-shaded.jar with the Jackson classes inside, but not jackson-module-scala_2.13-2.21.2.jar.

  4. added
    scope:dmn
    dependencies:maven
    on May 4, 2026
  5. added this to the 2.1.1 milestone on May 5, 2026
  6. kthoms commented on May 5, 2026

    @kthoms
    Contributor

    Fixed for release 2.1.1

    The malicious dependency jackson-module-scala is excluded from re-distribution.

    Added a verification step in the build of the Operaton distribution that no jackson-module-scala jar is present, because the artifact might sneak in by an upgrade that does have a different version suffix than 2.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependencies:mavenscope:dmn

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions