Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E255F17D54 for ; Thu, 19 Mar 2015 19:11:30 +0000 (UTC) Received: (qmail 58212 invoked by uid 500); 19 Mar 2015 19:11:23 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 58147 invoked by uid 500); 19 Mar 2015 19:11:23 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 56508 invoked by uid 99); 19 Mar 2015 19:11:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2015 19:11:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A84D2E1955; Thu, 19 Mar 2015 19:11:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shameera@apache.org To: commits@airavata.apache.org Date: Thu, 19 Mar 2015 19:11:56 -0000 Message-Id: <9c8eac07bd4c448494b9cf5dcca324b2@git.apache.org> In-Reply-To: <3e66fb1b0cae40f5bf736e2dcd8e1da2@git.apache.org> References: <3e66fb1b0cae40f5bf736e2dcd8e1da2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [38/50] [abbrv] airavata git commit: fixing AIRAVATA-1630 fixing AIRAVATA-1630 Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/990d72a1 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/990d72a1 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/990d72a1 Branch: refs/heads/new-workflow-design Commit: 990d72a1f007accea95d49a756cc5e10b20d924c Parents: 757e8a3 Author: Chathuri Wimalasena Authored: Fri Mar 13 14:35:57 2015 -0400 Committer: Chathuri Wimalasena Committed: Fri Mar 13 14:35:57 2015 -0400 ---------------------------------------------------------------------- .../org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 7 +++++++ .../java/org/apache/airavata/gfac/core/utils/GFacUtils.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/990d72a1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java index 420df6d..2ff0338 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java @@ -210,6 +210,7 @@ public class BetterGfacImpl implements GFac,Watcher { return submitJob(jobExecutionContext); } catch (Exception e) { log.error("Error inovoking the job with experiment ID: " + experimentID); + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); throw new GFacException(e); } } @@ -495,10 +496,13 @@ public class BetterGfacImpl implements GFac,Watcher { } return true; } catch (ApplicationSettingsException e) { + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); throw new GFacException("Error launching the Job",e); } catch (KeeperException e) { + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); throw new GFacException("Error launching the Job",e); } catch (InterruptedException e) { + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); throw new GFacException("Error launching the Job",e); } } @@ -509,6 +513,7 @@ public class BetterGfacImpl implements GFac,Watcher { jobExecutionContext = createJEC(experimentID, taskID, gatewayID); return cancel(jobExecutionContext); } catch (Exception e) { + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); log.error("Error inovoking the job with experiment ID: " + experimentID); throw new GFacException(e); } @@ -660,6 +665,7 @@ public class BetterGfacImpl implements GFac,Watcher { jobExecutionContext.getExperimentID(), jobExecutionContext.getGatewayID()); monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity)); + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); } catch (NullPointerException e1) { log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " + "NullPointerException occurred because at this point there might not have Job Created", e1, e); @@ -671,6 +677,7 @@ public class BetterGfacImpl implements GFac,Watcher { jobExecutionContext.getExperimentID(), jobExecutionContext.getGatewayID()); monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity)); + GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR ); } jobExecutionContext.setProperty(ERROR_SENT, "true"); http://git-wip-us.apache.org/repos/asf/airavata/blob/990d72a1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java index cbbce48..d30816e 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java @@ -792,7 +792,7 @@ public class GFacUtils { CorrectiveAction action, ErrorCategory errorCatogory) throws GFacException { try { - Registry registry = RegistryFactory.getDefaultRegistry(); + Registry registry = jobExecutionContext.getRegistry(); ErrorDetails details = new ErrorDetails(); details.setActualErrorMessage(errorMessage); details.setCorrectiveAction(action);