Croway opened a new pull request, #30288: URL: https://github.com/apache/camel/pull/30288
JIRA: [CAMEL-27115](https://issues.apache.org/jira/browse/CAMEL-27115) - A `META-INF/services/org/apache/camel/TypeConverter` file is read only when `loadTypeConverters` is on (off by default). With the default, the `@Converter` classes it lists were not loaded and nothing was logged. `DefaultTypeConverter` now logs a WARN on startup with the location of the file and the ways to load the converters (`camel.main.loadTypeConverters=true`, `@Converter(generateLoader = true)`, `addTypeConverters`). The check runs on start, so `loadTypeConverters` set after the type converter is created (camel-main, Spring) or a base package scan gives no WARN. Camel Quarkus overrides `loadCoreAndFastTypeConverters` (converters found at build time), so it gets no WARN. - The core converters of camel-base are found only through its `META-INF/services/org/apache/camel/TypeConverterLoader` file. A fat jar that kept the file of another Camel JAR started without them, and failed later with `No type converter available ... java.lang.String to ... java.time.Duration`. `BaseTypeConverterRegistry` now logs a WARN when no loader file lists `CamelBaseBulkConverterLoader`, with the files it found and the `prepare-fatjar` goal of the camel-maven-plugin. - Loading does not change: both are log lines only. - Docs: `type-converter.adoc` (classpath scanning with the `TypeConverter` file, type converters in a fat jar). Tests: `TypeConverterFilesNotLoadedWarningTest` (camel-core) fails on main 2 of 6 and passes 6 of 6 with the fix. The controls pass on both: `loadTypeConverters` set after the context is built, a base package scan, no `TypeConverter` file, and a fat jar whose `UberTypeConverterLoader` file (from `prepare-fatjar`) lists the core loader. _Claude Code on behalf of Federico Mariani_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
