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/master b66ce5031 -> 720ce73bb


[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/720ce73b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/720ce73b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/720ce73b

Branch: refs/heads/master
Commit: 720ce73bb6c01c2982f1ab3fce828461e8103414
Parents: b66ce50
Author: Thomas Diesler <[hidden email]>
Authored: Tue Jan 10 16:08:24 2017 +0100
Committer: Andrea Cosentino <[hidden email]>
Committed: Tue Jan 10 16:22:06 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/720ce73b/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...