From eb2d05c6c6a461f2ebec7a1ed5be629777199bd5 Mon Sep 17 00:00:00 2001 From: Vijayendra Bhamidipati Date: Mon, 11 Jun 2012 16:34:34 -0700 Subject: [PATCH] CS-15241: static NAT is not working when provider is set to Juniper SRX Description: Checking in fix for the exception seen due to the absence of the AsyncCommandQueued exception in the map of CSExceptionErrorCode which is used to look up the error code corresponding to a cloudstack exception. Also printing the stack trace in case an exception is not found in the map. --- utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java index 1e9939c2131..2789e62433c 100755 --- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java +++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java @@ -94,13 +94,15 @@ public class CSExceptionErrorCode { ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableException", 4520); ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableException", 4525); ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceException", 4530); - ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535); + ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535); + ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540); // Have a special error code for ServerApiException when it is // thrown in a standalone manner when failing to detect any of the above // standard exceptions. ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999); } catch (Exception e) { + e.printStackTrace(); throw new ExceptionInInitializerError(e); } }