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

Claus Ibsen updated CAMEL-23551:
--------------------------------
    Summary: camel-jbang - camel export to Spring Boot creates pom.xml with 
circular log4j dependecies  (was: camel-jbang - camel export creates pom.xml 
with circular log4j dependecies)

> camel-jbang - camel export to Spring Boot creates pom.xml with circular log4j 
> dependecies
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-23551
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23551
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.18.0
>            Reporter: Michael Weiss
>            Priority: Minor
>
> According to 
> [docs|https://camel.apache.org/manual/camel-jbang.html#_configuring_jdbc_datasources]
>  it is possible to declare Spring Boot style JDBC config with 
> spring.datasource. configuration in application.properties.
> While this works with JBangs camel run it does not work when exporting a 
> maven project with camel export. The reason is that the export pulls in 
> spring-boot-starter-jdbc which seems to create conflicts between 
> log4j-slf4j2-impl and log4j-to-slf4j.
> Boot error:
> {noformat}
> Exception in thread "main" java.lang.ExceptionInInitializerError
>         at 
> org.example.project.route.CamelApplication.main(CamelApplication.java:8)
> Caused by: org.apache.logging.log4j.LoggingException: log4j-slf4j2-impl 
> cannot be present with log4j-to-slf4j
>         at 
> org.apache.logging.slf4j.Log4jLoggerFactory.validateContext(Log4jLoggerFactory.java:67)
>         at 
> org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:49)
>         at 
> org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:32)
>         at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:52)
>         at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:32)
>         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:432)
>         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:457)
>         at 
> org.apache.camel.main.BaseMainSupport.<clinit>(BaseMainSupport.java:135)
>         ... 1 more
> {noformat}



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

Reply via email to