[ 
https://issues.apache.org/jira/browse/CAMEL-26316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-26316:
--------------------------------
    Description: 
>From the local-model benchmark of Oct 25-26 2026 (qwen3.6:35b-mlx through the 
>camel-jbang-mcp server, 7 rounds of 27 examples):

*1. Configuring a circuit breaker.* Asked to "add a resilience4jConfiguration", 
6 of 7 runs looked up resilience4j as a component. The answer was the 
camel.resilience4j.* keys "for application.properties (camel run reads them at 
startup)". 4 runs wrote the keys to application.properties and never configured 
the circuit breaker of their route; the reload did not apply the keys either 
(CAMEL-26320 makes a reload apply them). Now camel_catalog_doc for resilience4j 
and faulttolerance says first to set the options in the route, under 
circuitBreaker: resilience4jConfiguration: (or faultToleranceConfiguration:), 
and gives the keys as the defaults of every circuit breaker. The answers for 
the other main option groups say that a reload does not apply them.

*2. The Simple top-level ternary.* The message gave a fixed example, and 3 runs 
wrote the same top-level ternary up to 20 times in a row. The message now shows 
the expression itself, rewritten inside one function:
{code}
resource:file:${exchangeProperty.CamelTimerCounter} == 1 ? order.json : 
order-bad-email.json
{code}
becomes
{code}
resource:file:${exchangeProperty.CamelTimerCounter == 1 ? 'order.json' : 
'order-bad-email.json'}
{code}

*3. SQL errors.* Three runs wrote named parameters as :#\{body.customer\}. The 
sql component sends that to the database as written. The reload answer said 
only "BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []", 
and camel_error_diagnose found no known exception. The runs fixed it after 69 
to 92 failed messages. Now:
* The validator reports :#\{...\} in a sql: statement, with the forms to write 
(:#$\{body[customer]\} or :#customer), next to the check of a bare :name 
(CAMEL-24869).
* An ERROR line in the reload answer ends with the root cause of its stack 
trace when the line does not say it already: "(caused by PSQLException: ERROR: 
syntax error at or near ":" Position: 53)".
* camel_error_diagnose knows BadSqlGrammarException.

*4. Failing a message on purpose.* A step asks for a dead letter channel for 
the orders that the stock service cannot reserve. The runs added the dead 
letter channel, but nothing failed (r21: 7 of 7 runs, r22: 6 of 7). The model 
looked up the errorHandler sample in 12 of 14 runs, and its first sample (from 
error-handler.adoc) failed with a placeholder processor. The example now fails 
on purpose with a filter and throwException, in the XML, legacy Spring XML and 
YAML tabs; the samples of camel-jbang-core are regenerated.

_Filed by Claude Code on behalf of davsclaus_


  was:
>From the local-model benchmark of Oct 25-26 2026 (qwen3.6:35b-mlx through the 
>camel-jbang-mcp server, 7 rounds of 27 examples):

*1. Configuring a circuit breaker.* Asked to "add a resilience4jConfiguration", 
6 of 7 runs looked up resilience4j as a component. The answer was the 
camel.resilience4j.* keys "for application.properties (camel run reads them at 
startup)". 4 runs wrote the keys to application.properties, the write answered 
that the integration reloaded, and the circuit breaker never opened: a reload 
does not apply these keys (it applies camel.component.*, camel.dataformat.*, 
camel.language.* and new camel.beans.*, CAMEL-25767). Now:
* camel_catalog_doc for resilience4j and faulttolerance says first to set the 
options in the route, under circuitBreaker: resilience4jConfiguration: (or 
faultToleranceConfiguration:), and that a reload does not apply the keys. The 
answers for the other main option groups also say that a reload does not apply 
them.
* A write of a properties file that adds or changes camel.resilience4j.* or 
camel.faulttolerance.* keys gets a note: the same options written for the 
route, and that a restart applies the keys.

*2. The Simple top-level ternary.* The message gave a fixed example, and 3 runs 
wrote the same top-level ternary up to 20 times in a row. The message now shows 
the expression itself, rewritten inside one function:
{code}
resource:file:${exchangeProperty.CamelTimerCounter} == 1 ? order.json : 
order-bad-email.json
{code}
becomes
{code}
resource:file:${exchangeProperty.CamelTimerCounter == 1 ? 'order.json' : 
'order-bad-email.json'}
{code}

*3. SQL errors.* Three runs wrote named parameters as :#\{body.customer\}. The 
sql component sends that to the database as written. The reload answer said 
only "BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []", 
and camel_error_diagnose found no known exception. The runs fixed it after 69 
to 92 failed messages. Now:
* The validator reports :#\{...\} in a sql: statement, with the forms to write 
(:#$\{body[customer]\} or :#customer), next to the check of a bare :name 
(CAMEL-24869).
* An ERROR line in the reload answer ends with the root cause of its stack 
trace when the line does not say it already: "(caused by PSQLException: ERROR: 
syntax error at or near ":" Position: 53)".
* camel_error_diagnose knows BadSqlGrammarException.

*4. Failing a message on purpose.* A step asks for a dead letter channel for 
the orders that the stock service cannot reserve. The runs added the dead 
letter channel, but nothing failed (r21: 7 of 7 runs, r22: 6 of 7). The model 
looked up the errorHandler sample in 12 of 14 runs, and its first sample (from 
error-handler.adoc) failed with a placeholder processor. The example now fails 
on purpose with a filter and throwException, in the XML, legacy Spring XML and 
YAML tabs; the samples of camel-jbang-core are regenerated.

_Filed by Claude Code on behalf of davsclaus_



> camel-jbang - AI tools: circuit breaker options in the route, a top-level 
> ternary rewritten inside ${ }, and the cause of a sql error
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26316
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26316
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang, documentation
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to