conductor-oss/conductor · error · RuntimeException
Error parsing the json schema : {message}
Error message
Error parsing the json schema : {message} What it means
Thrown by LLMHelper.validateJsonSchema() when the SchemaDef's data cannot be serialized to JSON by Jackson (JsonProcessingException). This indicates the schema definition object itself is not serializable, typically because it contains non-serializable types or circular references.
Source
Thrown at ai/src/main/java/org/conductoross/conductor/ai/LLMHelper.java:349
return null;
}
Set<ValidationMessage> validationMessages =
jsonSchemaValidator.validate(schemaContent, data);
if (validationMessages != null && !validationMessages.isEmpty()) {
return String.format(
"Schema validation failed %s",
validationMessages.stream()
.map(ValidationMessage::getMessage)
.collect(Collectors.joining(", ")));
}
return null;
} catch (JsonSchemaException jpe) {
throw new RuntimeException(
"Bad/Unsupported schema? : " + jpe.getValidationMessages().toString());
} catch (JsonProcessingException jpe) {
throw new RuntimeException("Error parsing the json schema : " + jpe.getMessage(), jpe);
}
}
@SneakyThrows
private LLMResponse chatComplete(
ChatModel chatModel, ChatOptions chatOptions, ChatCompletion input) {
ChatClient chatClient = ChatClient.create(chatModel);
if (StringUtils.isNotBlank(input.getInstructions())) {
input.getMessages()
.addFirst(new ChatMessage(ChatMessage.Role.system, input.getInstructions()));
}
List<Message> messages =
new ArrayList<>(input.getMessages().stream().map(this::constructMessage).toList());
ensureLastMessageIsFromUser(messages);
Prompt prompt = new Prompt(messages, chatOptions);View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Inspect the SchemaDef.getData() object structure to identify non-serializable fields
- Ensure the schema is stored and loaded as a plain Map or POJO that Jackson can serialize
- Check the exception message (jpe.getMessage()) for the specific serialization failure
- Verify the schema definition was not corrupted during persistence/retrieval
Defensive patterns
Strategy: validation
Validate before calling
// Ensure SchemaDef data is serializable before use
if (schemaDef != null && schemaDef.getData() != null) {
try {
objectMapper.writeValueAsString(schemaDef.getData());
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("SchemaDef data is not serializable: " + e.getMessage(), e);
}
} Try / catch
try {
LLMResponse response = llmHelper.chatComplete(task, llm, chatCompletion, location, logger);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Error parsing the json schema")) {
log.error("SchemaDef serialization failed: {}", e.getMessage());
taskResult.setStatus(TaskResult.Status.FAILED_WITH_TERMINAL_ERROR);
} else {
throw e;
}
} Prevention
- Ensure SchemaDef.data is a plain Map<String, Object> or a simple POJO
- Avoid putting non-serializable objects in schema definitions
- Test schema loading in isolation during CI
When it happens
Trigger: objectMapper.writeValueAsString(schema.getData()) throws JsonProcessingException when serializing the SchemaDef data for validation. This happens when the schema data contains types Jackson cannot handle or the schema data structure is corrupt.
Common situations: The SchemaDef data was constructed programmatically with non-serializable objects. The schema definition loaded from persistence has a corrupted or unexpected structure. A version mismatch in the SchemaDef model causes fields to have unexpected types.
Related errors
- Output does not Confirm to the schema. errors: %s
- Bad/Unsupported schema? : {validationMessages}
- llmProvider not specified: {name}
- no configuration found for: {name}
- {"error":{errors},"response":{output}}
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/a1e591f44b813272.
Report an issue: GitHub.