Repository navigation
CAMEL-25777: camel-core - the tokenizer EIP works in XML and YAML routes, as each tokenizer names itself - #28085
Conversation
…tes, as each tokenizer names itself The reifier finds the tokenizer by its name, and only the Java DSL builder set that name. The XML and YAML DSL create the tokenizer with the no-arg constructors and set its implementation only, so their routes failed to start with "FailedToCreateRouteException ... because: jar" (a NullPointerException for the null name). Each tokenizer implementation now sets its name in its constructor, as its builder does, and the tokenizer falls back to the name of its implementation. modelName of the LangChain4j tokenizers is optional, as its metadata says, but @XmlAttribute(required = true) made the XSD and the model require it, so an XML route without it failed XSD validation. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
✅ Generated files are up to dateAn earlier CI run reported uncommitted generated changes; the latest run no longer does. |
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 566 of 706 tested, 25 compile-only — current: 566 all testedMaveniverse Scalpel detected 566 affected modules (current approach: 566). Skip-tests mode would test 566 modules (4 direct + 564 downstream), skip tests for 25 (generated code, meta-modules) Modules Scalpel would test (566)
Modules with tests skipped (25)
Build reactor — dependencies compiled but only changed modules were tested (4 modules, 1m 5s total)Total reactor time: 1m 5s
Top 20 slowest modules:
|
CAMEL-25777: the tokenizer EIP did not work in XML and YAML routes. The reifier finds the tokenizer by its name, and only the Java DSL builder set the name. The XML and YAML DSL create the tokenizer with the no-arg constructors and set its implementation only, so the route failed to start:
Found while adding XML and YAML tabs to the tokenizer EIP page (CAMEL-25774, #28079); its YAML example failed like this with
camel run.What
langChain4jParagraphTokenizerand so on), the same name its builder gives it.modelNameis optional, as its metadata says.@XmlAttribute(required = true)made the XSD and the model JSON require it, so an XML route without it failed XSD validation. The generated model JSON and the catalog copies of the XSDs and models change accordingly (one line each).Tests
LangChain4JTokenizerDefinitionTestbuilds the route the way the XML and YAML DSL do:new TokenizerDefinition()withsetTokenizerImplementation(...). A component cannot depend on the YAML DSL, because that makes a reactor cycle through camel-catalog. It also checks that each tokenizer has its name.🤖 Generated with Claude Code
https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m