This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 84e6468f456 CAMEL-21532: fix the Log4j2 config file not being 
respected in Camel JBang because of "java.lang.IllegalArgumentException: URI 
has an authority component" (#16514)
84e6468f456 is described below

commit 84e6468f456c46f84ebfe13b3729cd3365eb6178
Author: Bartosz Popiela <[email protected]>
AuthorDate: Wed Dec 11 07:55:21 2024 +0100

    CAMEL-21532: fix the Log4j2 config file not being respected in Camel JBang 
because of "java.lang.IllegalArgumentException: URI has an authority component" 
(#16514)
---
 .../main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java
index 851daa7cb2f..5fc9357f757 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java
@@ -87,7 +87,7 @@ public final class RuntimeUtil {
                 name = CommandLineHelper.CAMEL_JBANG_WORK_DIR + 
"/log4j2.properties";
                 Files.writeString(Paths.get(name), content);
 
-                Configurator.initialize("CamelJBang", "file://" + 
Path.of(name).toAbsolutePath());
+                Configurator.initialize("CamelJBang", 
Path.of(name).toAbsolutePath().toUri().toString());
             } else {
                 // use out of the box logging configuration
                 if (export) {

Reply via email to