Skip to content

Shade Jackson in box-java-sdk for embulk 0.9.x compatibility#10

Merged
r-uehara0219 merged 2 commits into
masterfrom
fix/shade-jackson-for-embulk-0.9-compat
Mar 15, 2026
Merged

Shade Jackson in box-java-sdk for embulk 0.9.x compatibility#10
r-uehara0219 merged 2 commits into
masterfrom
fix/shade-jackson-for-embulk-0.9-compat

Conversation

@r-uehara0219
Copy link
Copy Markdown
Contributor

@r-uehara0219 r-uehara0219 commented Mar 12, 2026

Summary

  • Fixes NoSuchMethodError: ReferenceType.upgradeFrom() when running on embulk 0.9.x
  • box-java-sdk 5.4.0 brings Jackson 2.18.2 as a transitive dependency, which conflicts with Jackson 2.6.7 bundled in embulk 0.9.x
  • Introduces a shadow-box-java-sdk subproject that shades box-java-sdk with Jackson 2.6.7 and relocates Jackson packages to embulk.box.com.fasterxml.jackson, following the same pattern used in embulk-input-kintone

Changes

  • shadow-box-java-sdk/build.gradle — New subproject that builds a shaded jar with Jackson relocated
  • build.gradle — Reference shaded jar instead of direct box-java-sdk dependency; add Shadow plugin declaration
  • settings.gradle — New file to define multi-module project
  • Dependency lockfiles updated accordingly

Test plan

  • Verified ./gradlew gem builds successfully
  • Verified Jackson jars are not directly included in gem classpath (only the shaded jar)
  • Verified relocated classes exist in shadow jar (embulk.box.com.fasterxml.jackson.*)
  • Verified successful embulk run with embulk 0.9.25 against Box API (stdout output)

🤖 Generated with Claude Code

box-java-sdk 5.4.0 brings in Jackson 2.18.2 as a transitive dependency,
which conflicts with the Jackson 2.6.7 bundled in embulk 0.9.x. The
embulk classloader loads the older version first, causing
NoSuchMethodError on ReferenceType.upgradeFrom().

This commit introduces a shadow subproject (shadow-box-java-sdk) that
bundles box-java-sdk with Jackson 2.6.7 and relocates Jackson packages
to embulk.box.com.fasterxml.jackson, following the same pattern used in
embulk-input-kintone.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@yas-okadatech yas-okadatech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@r-uehara0219 r-uehara0219 merged commit 1269b6a into master Mar 15, 2026
1 check passed
@r-uehara0219 r-uehara0219 deleted the fix/shade-jackson-for-embulk-0.9-compat branch March 15, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants