Skip to content

Blinker NoClassDefFoundError: com/mongodb/internal/binding/ReferenceCounted #4842

@Osmyslitelny

Description

@Osmyslitelny

Context:
We have scheduled services (jobs) that run multiple times a day. However, there is an issue where 1-3 runs per day fail with an error. All other runs are problem-free. Therefore, the error seems blinked.

Environment:

  1. We run these services using an docker image on Kubernetes.
  2. We connect to AWS DocumentDB.

Versions:
I think the main dependencies are Spring and related MongoDB libraries (such as mongo-driver). We obtain these dependencies through spring-boot-dependencies. Also, every spring version have different mongo related lib versions. We have tested them with different versions:

  1. spring 3.3.2 - no issues (or we never catch them)
  2. spring 3.3.4 - error occurs
  3. spring 3.3.5 - error occurs
  4. spring 3.4.0 - error occurs

Verification:
Since the issue is not consistent, we have examined the logs and checked for common causes such as missing classpath or empty BOOT-INF data and etc. Everything appears correct (and most of the runs are successful).

Error full stacktrace:
trace.txt

Notes:

  1. At different versions, sometimes we encounter a NoClassDefFoundError with other com/mongodb classes.
  2. Mongo FAQ that related to issue but looks like everything at our sine is correct. That why was decided that problem could be on spring side.
  3. Local Integration test + mongo testcontainer (not AWS DocumentDB) never get error.
  4. Maybe something related with 38611

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions