cruise-control icon indicating copy to clipboard operation
cruise-control copied to clipboard

Fix Jackson Dependency Misalignment Causing Vert.x Initialization Failures

Open MRuhan17 opened this issue 1 month ago • 0 comments

Summary

1.Why: Issue #2333 was caused by Jackson modules being out of sync, which broke Vert.x’s JSON annotation handling. This resulted in missing classes like JsonIncludeProperties and triggered runtime errors during initialization.

2.What: Aligned all Jackson dependencies by introducing the Jackson BOM (com.fasterxml.jackson:jackson-bom:2.17.2) in both cruise-control and cruise-control-metrics-reporter modules. Removed redundant version pins and updated tests by adding MainVerticleTest to verify Vert.x server initialization and ensure Jackson annotations load correctly.

Expected Behavior

Vert.x–based components should start normally, Jackson annotations should resolve without errors, and MainVerticle should instantiate successfully during tests and runtime.

Actual Behavior

Before this fix, Jackson classes required by Vert.x (notably JsonIncludeProperties) were missing due to mismatched dependency versions. This caused errors or crashes when loading Vert.x JSON handling code and prevented successful initialization.

Steps to Reproduce

1.Build and start the project with the previous dependency configuration (without the Jackson BOM).

2.Attempt to instantiate or run Vert.x components that rely on Jackson annotations.

3.Observe class-not-found errors for Jackson annotations during runtime or test execution.

Known Workarounds

None, aside from manually pinning matching Jackson versions across all modules.

Additional evidence

1.Environment:

Gradle build with Vert.x dependencies

Jackson modules before and after version alignment

2.Logs: ClassNotFoundException for com.fasterxml.jackson.annotation.JsonIncludeProperties during Vert.x initialization.

3.Tests:

MainVerticleTest::testMainVerticleCreation validates Vert.x initialization.

MainVerticleTest::testJacksonDependenciesAvailable confirms Jackson annotation availability.

4.

Relevant stack traces or snippets

Paste your class-not-found or build error logs here if needed.

Categorization

  • [ ] documentation
  • [ ✔️] bugfix
  • [ ] new feature
  • [ ] refactor
  • [ ] security/CVE
  • [ ] other

This PR resolves #<Replace-Me-With-The-Issue-Number-Addressed-By-This-PR> if any.

MRuhan17 avatar Nov 25 '25 12:11 MRuhan17