Skip to content

[Bug]: agentscope-core 1.0.11 自身的依赖管理 bug(同时依赖 Jackson 2.x 和需要 Jackson 3.x 的 json-schema-validator)。 #1100

@memolecard

Description

@memolecard

Bug Report: Jackson 2.x and 3.x mixed dependency causing NoClassDefFoundError
Environment
agentscope-core version: 1.0.11
Java version: 17
OS: Linux
Framework: JeecgBoot 3 (Spring Boot 3)
Description
agentscope-core:1.0.11 has a transitive dependency conflict between Jackson 2.x and Jackson 3.x, causing a fatal NoClassDefFoundError at runtime when ToolValidator attempts to validate tool inputs.

Root Cause
agentscope-core:1.0.11 declares both:

Jackson 2.x (direct or transitive):
com.fasterxml.jackson.core:jackson-databind:2.21.1
com.fasterxml.jackson.core:jackson-annotations:2.21.x
com.networknt:json-schema-validator:3.0.1, which depends on Jackson 3.x:
tools.jackson.core:jackson-databind:3.1.0
tools.jackson.core:jackson-dataformat-yaml:3.1.0
The problem is compounded by the fact that json-schema-validator:3.0.1’s POM does not declare tools.jackson.core:jackson-annotations as a dependency, so it is never pulled into the classpath.

At runtime, tools.jackson.databind.introspect.JacksonAnnotationIntrospector (from Jackson 3.x databind) attempts to load com.fasterxml.jackson.annotation.JsonSerializeAs — but this class only exists in Jackson 3.x annotations under the tools.jackson.annotation package. Since only Jackson 2.x annotations exist on the classpath, the JVM throws:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions