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

Claus Ibsen resolved CAMEL-24257.
---------------------------------
    Resolution: Fixed

> camel export fails with MongoTimeoutException for kamelets using #class: 
> Component beans
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24257
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24257
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.18.4, 4.22.0
>
>
> camel export fails with MongoTimeoutException / AllNodesFailedException for 
> kamelets using #class: Component beans (e.g. mongodb-sink, cassandra-sink) 
> because the real component is instantiated instead of being replaced with 
> StubComponent.
> The root cause is a regression from commit 5d4c6cbf0746 (CAMEL-22667) which 
> added an outer else branch in KameletMainInjector.acceptComponent(). This 
> branch also fires when stubPattern is "*" (used by camel export), overriding 
> accept=false back to true for components not in ACCEPTED_STUB_NAMES, causing 
> real components like MongoDbComponent / CassandraComponent to be loaded and 
> attempt connections to non-existent instances.
> Fix: remove the outer else branch so that when stubPattern is "*", accept 
> remains as returned by accept(type) — true for ACCEPTED_STUB_NAMES 
> components, false for everything else.
> GitHub PR: https://github.com/apache/camel/pull/25097



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to