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

Work on CAMEL-25968 started by Claus Ibsen.
-------------------------------------------
> camel-core - a component that fails to start with an exception without a 
> message hides the error behind a NullPointerException
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25968
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25968
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 4.18.0, 4.22.0, 4.23.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> When a component fails to start with an exception that has no message, such 
> as a NullPointerException, the start of the CamelContext fails with 
> {{java.lang.NullPointerException: message}} instead of the error of the 
> component. The name of the component and the cause are both lost.
> {{AbstractCamelContext.doStartCamel}} wraps the failure as {{new 
> FailedToStartComponentException(entry.getKey(), e.getMessage(), e)}} (main 
> e6885df7894d, line 3184), and the constructor of 
> {{FailedToStartComponentException}} calls {{Objects.requireNonNull(message, 
> "message")}} (line 40). That check came in with CAMEL-22640 (2026-05-13).
> Checked on 4.24.0-SNAPSHOT with {{camel run}}: an infinispan-embedded 
> component whose configurationUri cannot be opened fails to start with a 
> {{CacheConfigurationException}} without a message, and the integration then 
> stops with only:
> {noformat}
> ERROR: message
> java.lang.NullPointerException: message
> {noformat}
> Starting the component directly shows the real error.
> *Proposed change*: use the class name of the cause when it has no message, or 
> let the constructor accept a null message.
> _Claude Code on behalf of davsclaus_



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

Reply via email to