Claus Ibsen created CAMEL-25976:
-----------------------------------

             Summary: camel-infinispan - the configurationUri of 
infinispan-embedded does not load a file, and the endpoint cache options are 
not used
                 Key: CAMEL-25976
                 URL: https://issues.apache.org/jira/browse/CAMEL-25976
             Project: Camel
          Issue Type: Bug
          Components: camel-infinispan
    Affects Versions: 4.18.0, 4.22.0, 4.23.0
            Reporter: Claus Ibsen
             Fix For: 4.24.0


A configurationUri of the infinispan-embedded component that names a file, as 
{{file:/path/infinispan.xml}} or as an absolute path, does not load: the 
component fails to start with a {{CacheConfigurationException}} without a 
message, caused by a NullPointerException in the Infinispan parser.

{{InfinispanEmbeddedComponent.doInit}} creates the manager without the 
CamelContext ({{new InfinispanEmbeddedManager(configuration)}}, main 
e6885df7894d, line 56). {{InfinispanUtil.openInputStream}} then falls back to 
the context class loader (line 62), which knows neither {{file:}} nor a path, 
so the stream is null. Only a name on the class path works, and placeholders in 
the uri are not resolved. Since the manager is component-wide (CAMEL-21963), 
the endpoint options {{configurationUri}}, {{cacheContainer}}, 
{{cacheContainerConfiguration}} and {{flags}} are not used either.

Checked on 4.24.0-SNAPSHOT with {{camel run}}: 
{{camel.component.infinispan-embedded.configurationUri=file:/path/infinispan.xml}}
 and the absolute path both fail; {{infinispan.xml}} on the class path works. 
Because of a separate problem of camel-core, the error shown is only 
{{NullPointerException: message}}.

*Proposed change*: give the manager the CamelContext of the component, so the 
uri goes through {{ResourceHelper}}, and say in the docs which options are only 
read on the component.

_Claude Code on behalf of davsclaus_



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

Reply via email to