camel git commit: [CAMEL-10692] OptaPlanner cannot load config from deployment

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-10692] OptaPlanner cannot load config from deployment

acosentino
Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 37c6375b7 -> fe4b3f9ca


[CAMEL-10692] OptaPlanner cannot load config from deployment


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

Branch: refs/heads/camel-2.18.x
Commit: fe4b3f9ca39133fe85bd298c72e65c8b66aa62cc
Parents: 37c6375
Author: Thomas Diesler <[hidden email]>
Authored: Tue Jan 10 16:08:24 2017 +0100
Committer: Thomas Diesler <[hidden email]>
Committed: Tue Jan 10 16:08:24 2017 +0100

----------------------------------------------------------------------
 .../apache/camel/component/optaplanner/OptaPlannerEndpoint.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fe4b3f9c/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
index 6ba85f8..5c5a43c 100644
--- a/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
+++ b/components/camel-optaplanner/src/main/java/org/apache/camel/component/optaplanner/OptaPlannerEndpoint.java
@@ -46,7 +46,8 @@ public class OptaPlannerEndpoint extends DefaultEndpoint {
     public OptaPlannerEndpoint(String uri, Component component, OptaPlannerConfiguration configuration) {
         super(uri, component);
         this.configuration = configuration;
-        solverFactory = SolverFactory.createFromXmlResource(configuration.getConfigFile());
+        ClassLoader classLoader = getCamelContext().getApplicationContextClassLoader();
+        solverFactory = SolverFactory.createFromXmlResource(configuration.getConfigFile(), classLoader);
     }
 
     protected Solver getOrCreateSolver(String solverId) throws Exception {

Loading...