Skip to content

Fix Jackson classloader conflicts in dependent plugins - #168

Merged
ruibaby merged 1 commit into
mainfrom
fix/exclude-bundled-jackson
Oct 7, 2026
Merged

ruibaby merged 1 commit into
mainfrom
fix/exclude-bundled-jackson

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 6, 2026

Copy link
Copy Markdown
Member

Bundled Jackson classes in PluginLinks can cause a LinkageError when a dependent plugin accesses Halo's Jackson APIs. Exclude the transitive com.fasterxml.jackson.core dependencies from nitrite-support so Jackson is provided by Halo.

Fixes #167

Reproduced with the official PluginLinks 2.3.0 JAR, Halo API 2.25.0, and PF4J 3.15.0 in a minimal classloader harness. A plugin classloader declaring a dependency on PluginLinks fails when calling either JsonUtils.mapper().convertValue(...) or Unstructured.OBJECT_MAPPER.convertValue(...), with a loader constraint violation for ObjectMapper. Both calls succeed with the rebuilt JAR after this change. A full Halo 2.26.1 integration test was not performed.

Validation:

  • ./gradlew build passed: 369 backend tests and 171 frontend tests, including 13 Nitrite migration tests.
  • runtimeClasspath no longer contains com.fasterxml.jackson.core dependencies.
  • The rebuilt JAR contains no com/fasterxml/jackson/** entries and retains the Nitrite importer.
  • Both mapper calls pass in the classloader harness using the rebuilt JAR.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T14:47:45.205812Z 5da80fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5da80fc9aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread build.gradle
@ruibaby
ruibaby merged commit 01db89e into main Oct 7, 2026
1 check passed
@ruibaby
ruibaby deleted the fix/exclude-bundled-jackson branch October 7, 2026 11: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.

[Bug] 插件 JAR 中重复打包 com.fasterxml.jackson 导致 LinkageError

1 participant