You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/06/02 05:31:00 UTC
[jira] [Updated] (CAMEL-16662) camel-spring-boot - Classloader
cannot find xml route files inside spring boots proprietary layout
[ https://issues.apache.org/jira/browse/CAMEL-16662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-16662:
--------------------------------
Fix Version/s: 3.11.0
> camel-spring-boot - Classloader cannot find xml route files inside spring boots proprietary layout
> --------------------------------------------------------------------------------------------------
>
> Key: CAMEL-16662
> URL: https://issues.apache.org/jira/browse/CAMEL-16662
> Project: Camel
> Issue Type: Bug
> Components: camel-spring-boot, camel-spring-boot-starters
> Affects Versions: 3.10.0
> Reporter: Giacomo Carnevale
> Priority: Major
> Fix For: 3.11.0
>
>
> Hi
> I have cloned camel spring boot example [[https://github.com/apache/camel-spring-boot-examples/tree/main/xml] [camel-spring-boot-examples|https://github.com/apache/camel-spring-boot-examples/tree/main/xml] [/xml|https://github.com/apache/camel-spring-boot-examples/tree/main/xml] .|https://github.com/apache/camel-spring-boot-examples/tree/main/xml]
> If I run the example with maven command _mvn spring-boot:run_ It works (route camel/my-route.xml loaded).
> *Routes startup summary (total:1 started:1)*
> If I build the example and run with _java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_ It doesn't work (route camel/my-route.xml not loaded).
> *Routes startup summary (total:0 started:0)*
> I suppose that spring boot maven plugin works with classes file and not with jar file, so I modified (unzip and zip) the jar file moving *BOOT-INF/classes/camel* to jar root folder and It works.
>
> git clone [https://github.com/apache/camel-spring-boot-examples.git|https://github.com/apache/camel-spring-boot-examples.git_]
> _cd camel-spring-boot-examples/xml_
> _mvn spring-boot:run_
> --------> {color:#00875a}Routes startup summary (total:1 started:1){color}
>
> _mvn clean package_
> _java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_
> -------->{color:#ff0000} Routes startup summary (total:0 started:0){color}
>
> _cp target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar ._
> _cp -r src/main/resources/camel/ ._
> _zip camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar camel/my-route.xml_
> _java -jar camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_
> {color:#00875a}--------> Routes startup summary (total:1 started:1){color}
> Giacomo
--
This message was sent by Atlassian Jira
(v8.3.4#803005)