knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject knox git commit: KNOX-1612 - GatewayAdminTopologyFuncTest#testPutTopology ClassNotFoundException
Date Mon, 19 Nov 2018 15:29:40 GMT
Repository: knox
Updated Branches:
  refs/heads/v1.2.0 58af7e65a -> 2070b8428


KNOX-1612 - GatewayAdminTopologyFuncTest#testPutTopology ClassNotFoundException

Signed-off-by: Kevin Risden <krisden@apache.org>


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

Branch: refs/heads/v1.2.0
Commit: 2070b8428379692816469ff96da463c84862b849
Parents: 58af7e6
Author: Kevin Risden <krisden@apache.org>
Authored: Fri Nov 16 16:50:11 2018 -0500
Committer: Kevin Risden <krisden@apache.org>
Committed: Mon Nov 19 10:29:30 2018 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/knox/gateway/GatewayServer.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/2070b842/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
index 9f9bc1e..c9294a9 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
@@ -696,7 +696,7 @@ public class GatewayServer {
     context.setTempDirectory( FileUtils.getFile( warFile, "META-INF", "temp" ) );
     context.setErrorHandler( createErrorHandler() );
     context.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
-
+    context.setClassLoader(this.getClass().getClassLoader());
     return context;
   }
 
@@ -793,16 +793,18 @@ public class GatewayServer {
       }
       contexts.addHandler( newContext );
       if( contexts.isRunning() && !newContext.isRunning() ) {
-          newContext.start();
+        newContext.start();
+        if(!newContext.isAvailable()) {
+          throw newContext.getUnavailableException();
+        }
       }
 
-    } catch( Exception e ) {
+    } catch( Throwable e ) {
       auditor.audit( Action.DEPLOY, topology.getName(), ResourceType.TOPOLOGY, ActionOutcome.FAILURE
);
       log.failedToDeployTopology( topology.getName(), e );
     }
   }
 
-
   private synchronized void internalDeactivateTopology( Topology topology ) {
 
     log.deactivatingTopology( topology.getName() );


Mime
View raw message