[
https://issues.apache.org/jira/browse/CAMEL-27447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27447 started by Claus Ibsen.
-------------------------------------------
> camel-jbang - download the MySQL JDBC driver for debezium-mysql, as it does
> for the sql and jdbc components
> -----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27447
> URL: https://issues.apache.org/jira/browse/CAMEL-27447
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> A route with {{debezium-mysql}} fails to start on Camel JBang:
> {noformat}
> java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
> {noformat}
> The MySQL driver ({{com.mysql:mysql-connector-j}}) is GPL, so
> camel-debezium-mysql declares it as {{provided}}, and it is not on the
> classpath. {{known-third-party-libraries.properties}} of camel-kamelet-main
> maps {{com.mysql.cj}}, and Camel JBang downloads the driver when a {{sql}} or
> {{jdbc}} route loads it (the {{mysql-source}} Kamelet works). Debezium loads
> the driver itself with {{Class.forName}}, which does not go through the class
> resolver that downloads it.
> So the {{debezium-mysql-source}} Kamelet (apache/camel-kamelets#3381) has to
> tell users to add {{--dep=mvn:com.mysql:mysql-connector-j:<version>}}, a
> version in a description that will age.
> Expected: Camel JBang adds the MySQL driver when an integration uses
> {{debezium-mysql}} (for example from the component's known dependencies, or
> by resolving it before Debezium starts), in the version Camel manages, and
> {{camel export}} adds it to the project. The same check for the other
> Debezium connectors whose driver is not a dependency (Oracle, Db2).
> Found while adding the debezium-mysql-source Kamelet
> (apache/camel-kamelets#3373, 2026-11-23).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)