Quantcast

camel git commit: CAMEL-10689: NoFactoryAvailableException when invoking component-list ssh command

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

camel git commit: CAMEL-10689: NoFactoryAvailableException when invoking component-list ssh command

lburgazzoli-2
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x fe4b3f9ca -> fc47b3a6b


CAMEL-10689: NoFactoryAvailableException when invoking component-list ssh command

(cherry picked from commit 77f8f36d18f719c42de0ecec45a79098338b3021)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fc47b3a6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fc47b3a6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fc47b3a6

Branch: refs/heads/camel-2.18.x
Commit: fc47b3a6b6c8e8bae60a748d5781d19de74007d3
Parents: fe4b3f9
Author: lburgazzoli <[hidden email]>
Authored: Tue Jan 10 16:26:44 2017 +0100
Committer: lburgazzoli <[hidden email]>
Committed: Tue Jan 10 16:38:03 2017 +0100

----------------------------------------------------------------------
 .../apache/camel/impl/DefaultCamelContext.java  | 36 +++++++++++++++++---
 .../src/main/resources/application.yml          |  4 ++-
 2 files changed, 35 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fc47b3a6/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index b9d21c7..6907aa1 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1376,7 +1376,14 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         // where the documentation exists as well
         FactoryFinder finder = getFactoryFinder(DefaultComponentResolver.RESOURCE_PATH);
         try {
-            Class<?> clazz = finder.findClass(componentName);
+            Class<?> clazz = null;
+            try {
+                finder.findClass(componentName);
+            } catch (NoFactoryAvailableException e) {
+                // ignore, i.e. if a component is an auto-configured spring-boot
+                // components
+            }
+
             if (clazz == null) {
                 // fallback and find existing component
                 Component existing = hasComponent(componentName);
@@ -1417,7 +1424,14 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         // where the documentation exists as well
         FactoryFinder finder = getFactoryFinder(DefaultComponentResolver.RESOURCE_PATH);
         try {
-            Class<?> clazz = finder.findClass(componentName);
+            Class<?> clazz = null;
+            try {
+                clazz = finder.findClass(componentName);
+            } catch (NoFactoryAvailableException e) {
+                // ignore, i.e. if a component is an auto-configured spring-boot
+                // component
+            }
+
             if (clazz == null) {
                 // fallback and find existing component
                 Component existing = hasComponent(componentName);
@@ -1458,7 +1472,14 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         // where the documentation exists as well
         FactoryFinder finder = getFactoryFinder(DefaultDataFormatResolver.DATAFORMAT_RESOURCE_PATH);
         try {
-            Class<?> clazz = finder.findClass(dataFormatName);
+            Class<?> clazz = null;
+            try {
+                finder.findClass(dataFormatName);
+            } catch (NoFactoryAvailableException e) {
+                // ignore, i.e. if a component is an auto-configured spring-boot
+                // data-formats
+            }
+
             if (clazz == null) {
                 return null;
             }
@@ -1489,7 +1510,14 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
         // where the documentation exists as well
         FactoryFinder finder = getFactoryFinder(DefaultLanguageResolver.LANGUAGE_RESOURCE_PATH);
         try {
-            Class<?> clazz = finder.findClass(languageName);
+            Class<?> clazz = null;
+            try {
+                finder.findClass(languageName);
+            } catch (NoFactoryAvailableException e) {
+                // ignore, i.e. if a component is an auto-configured spring-boot
+                // languages
+            }
+
             if (clazz == null) {
                 return null;
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/fc47b3a6/examples/camel-example-spring-boot/src/main/resources/application.yml
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot/src/main/resources/application.yml b/examples/camel-example-spring-boot/src/main/resources/application.yml
index 6ee4f40..54bbf52 100644
--- a/examples/camel-example-spring-boot/src/main/resources/application.yml
+++ b/examples/camel-example-spring-boot/src/main/resources/application.yml
@@ -16,7 +16,9 @@
 ## ------------------------------------------------------------------------
 
 spring.main.sources: org.apache.camel.example.spring.boot.MySpringBootRouter
-shell.auth.simple.user.password: password
+
+management.shell.auth.simple.user.name: user
+management.shell.auth.simple.user.password: password
 
 camel:
   springboot:

Loading...