Skip to content

JsonSchemaValidator fails to load schema in OSGi environments #992

Description

@tim-schneider-elo

Bug description
When I try to run the MCP Server with version 2.0.0-M3 it does not start, because it can't find the schema.

 SchemaRegistry :775 |  Failed to load json schema from https://json-schema.org/draft/2020-12/schema
java.io.FileNotFoundException: classpath:draft/2020-12/schema
        at com.networknt.schema.resource.ClasspathResourceLoader.lambda$getResource$0(ClasspathResourceLoader.java:75)
        at com.networknt.schema.SchemaRegistry.getMappedSchema(SchemaRegistry.java:749)
        at com.networknt.schema.SchemaRegistry.loadSchema(SchemaRegistry.java:734)
        at com.networknt.schema.SchemaRegistry.getSchema(SchemaRegistry.java:649)
        at io.modelcontextprotocol.json.schema.jackson3.DefaultJsonSchemaValidator.<init>(DefaultJsonSchemaValidator.java:54)

Environment
SDK: 2.0.0-M3

Steps to reproduce

  • Try to start the server

Expected behavior

  • Server should start normally

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Moderate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingwaiting for userWaiting for user feedback or more details

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions