← All tasks
javamodelcontextprotocol/java-sdk #992Not a task: already works

JsonSchemaValidator fails to load schema in OSGi environments

envgap__modelcontextprotocol__java-sdk-992

01 / FAILURE SIGNATURE

As reported upstream

java.io.FileNotFoundException: classpath:draft/2020-12/schema
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
30f1adf6131eaef577260431f507c61c1f1cc9fc
Manifest
pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

modelcontextprotocol/java-sdk #992 · read the original issue
**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
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]