Currently, the Restate Java SDK (dev.restate:sdk-serde-jackson) relies on the 4.x branch (specifically 4.38.0) of com.github.victools:jsonschema-generator.
When attempting to use Restate alongside Spring AI 2.0.0 (which relies on the 5.0.0 branch of the same victools libraries), it creates a strict classpath conflict. Because version 5.0.0 introduced breaking changes to the SchemaGeneratorConfigBuilder constructors, the application crashes on startup depending on which version Gradle resolves.
The Error
If Gradle defaults to version 5.0.0, the Restate SDK crashes during initialization with the following NoSuchMethodError:
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
dev.restate.serde.jackson.JacksonSerdes.<clinit>(JacksonSerdes.java:56)
The following method did not exist:
'void com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder.<init>(com.fasterxml.jackson.databind.ObjectMapper, com.github.victools.jsonschema.generator.SchemaVersion, com.github.victools.jsonschema.generator.OptionPreset)'
If I attempt to resolve the conflict by forcing Gradle to downgrade jsonschema-generator to 4.38.0, it breaks Spring AI's companion module (jsonschema-module-jackson at 5.0.0), resulting in:
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.github.victools.jsonschema.module.jackson.JacksonSchemaModule.applyToConfigBuilder(JacksonSchemaModule.java:91)
The following method did not exist:
'tools.jackson.databind.ObjectMapper com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder.getObjectMapper()'
Proposed Solution
Upgrade the com.github.victools:jsonschema-generator dependency in sdk-serde-jackson to version 5.0.0 (or the latest 5.x).
This will align the Restate SDK with the modern Spring Boot 3 / Spring AI 2.x ecosystem and prevent binary incompatibilities for users building AI-driven Restate applications.
Steps to Reproduce
- Create a Spring Boot project.
- Add dependencies for
dev.restate:sdk-spring-boot-starter:2.8.0 and org.springframework.ai:spring-ai-starter-model-openai:2.0.0.
- Start the application.
- Observe the
NoSuchMethodError during startup.
Currently, the Restate Java SDK (
dev.restate:sdk-serde-jackson) relies on the4.xbranch (specifically4.38.0) ofcom.github.victools:jsonschema-generator.When attempting to use Restate alongside Spring AI 2.0.0 (which relies on the
5.0.0branch of the samevictoolslibraries), it creates a strict classpath conflict. Because version 5.0.0 introduced breaking changes to theSchemaGeneratorConfigBuilderconstructors, the application crashes on startup depending on which version Gradle resolves.The Error
If Gradle defaults to version
5.0.0, the Restate SDK crashes during initialization with the followingNoSuchMethodError:If I attempt to resolve the conflict by forcing Gradle to downgrade
jsonschema-generatorto4.38.0, it breaks Spring AI's companion module (jsonschema-module-jacksonat5.0.0), resulting in:Proposed Solution
Upgrade the
com.github.victools:jsonschema-generatordependency insdk-serde-jacksonto version5.0.0(or the latest5.x).This will align the Restate SDK with the modern Spring Boot 3 / Spring AI 2.x ecosystem and prevent binary incompatibilities for users building AI-driven Restate applications.
Steps to Reproduce
dev.restate:sdk-spring-boot-starter:2.8.0andorg.springframework.ai:spring-ai-starter-model-openai:2.0.0.NoSuchMethodErrorduring startup.