ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml and security/ocsf/ocsf.camel.yaml send to langchain4j-chat with chatModel: "#chatModel", but neither example declares a bean named chatModel any more: not in the YAML, not in application.properties. Starting either fails when the endpoint looks the bean up.
The bean was lost on May 21 in 60a70d8 ("normalize REST DSL, routeConfiguration, and beans examples to canonical form"). Both files were rewritten by the YAML round-trip, and the beans: block at the top of each, a Groovy script building the model, did not survive:
- beans:
- name: chatModel
type: "#class:dev.langchain4j.model.ollama.OllamaChatModel"
scriptLanguage: groovy
script: |
import dev.langchain4j.model.ollama.OllamaChatModel
import static java.time.Duration.ofSeconds
return OllamaChatModel.builder()
.baseUrl("{{ollama.base.url}}")
.modelName("{{ollama.model.name}}")
.temperature(0.3)
.timeout(ofSeconds(120))
.build()
Nobody noticed because neither example runs in CI: both are bundled: false and need Ollama (and Docling for the RAG one).
Fix on 4.22: put the bean back in both files, in the builder form the ai/langchain4j-chat example uses (type, builderClass, builderMethod, properties) rather than the Groovy script, so it matches the rest of the group. The RAG README's "Using OpenAI instead of Ollama" section shows the Groovy form and should follow.
On 4.23 the bean goes away again in favour of the provider options, see #91; this issue is about making the examples run now.
Worth a check: pqc-secure-file-transfer also references #kemKeyPair, but it binds that in a script step, so it is fine. A CI check that every "#name" reference in an example has a declaration would have caught this.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
ai/docling-langchain4j-rag/docling-langchain4j-rag.yamlandsecurity/ocsf/ocsf.camel.yamlsend tolangchain4j-chatwithchatModel: "#chatModel", but neither example declares a bean namedchatModelany more: not in the YAML, not inapplication.properties. Starting either fails when the endpoint looks the bean up.The bean was lost on May 21 in 60a70d8 ("normalize REST DSL, routeConfiguration, and beans examples to canonical form"). Both files were rewritten by the YAML round-trip, and the
beans:block at the top of each, a Groovy script building the model, did not survive:Nobody noticed because neither example runs in CI: both are
bundled: falseand need Ollama (and Docling for the RAG one).Fix on 4.22: put the bean back in both files, in the builder form the
ai/langchain4j-chatexample uses (type,builderClass,builderMethod,properties) rather than the Groovy script, so it matches the rest of the group. The RAG README's "Using OpenAI instead of Ollama" section shows the Groovy form and should follow.On 4.23 the bean goes away again in favour of the provider options, see #91; this issue is about making the examples run now.
Worth a check:
pqc-secure-file-transferalso references#kemKeyPair, but it binds that in a script step, so it is fine. A CI check that every"#name"reference in an example has a declaration would have caught this.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj