Repository: oozie Updated Branches: refs/heads/branch-5.1 c85f57716 -> 4d2d799a0
OOZIE-3386 Misleading error message when workflow application does not exist (kmarton) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/4d2d799a Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/4d2d799a Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/4d2d799a Branch: refs/heads/branch-5.1 Commit: 4d2d799a0d6a455af5d6331d7045317eb260d596 Parents: c85f577 Author: Julia Kinga Marton <kmar...@apache.org> Authored: Wed Nov 28 12:29:46 2018 +0100 Committer: Julia Kinga Marton <kmar...@apache.org> Committed: Wed Nov 28 12:29:46 2018 +0100 ---------------------------------------------------------------------- .../java/org/apache/oozie/servlet/V1JobsServlet.java | 12 +++++++----- release-log.txt | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/4d2d799a/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java b/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java index b7967be..8ffd441 100644 --- a/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java +++ b/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java @@ -144,8 +144,9 @@ public class V1JobsServlet extends BaseJobsServlet { } final List<String> appPathsWithFileNames; - if (!findAppPathsWithFileNames(conf.get(OozieClient.APP_PATH), "workflow.xml").isEmpty()) { - appPathsWithFileNames = findAppPathsWithFileNames(conf.get(OozieClient.APP_PATH), "workflow.xml"); + final String appPath = conf.get(OozieClient.APP_PATH); + if (!findAppPathsWithFileNames(appPath, "workflow.xml").isEmpty()) { + appPathsWithFileNames = findAppPathsWithFileNames(appPath, "workflow.xml"); } else if (!findAppPathsWithFileNames(conf.get(OozieClient.LIBPATH), "workflow.xml").isEmpty()) { appPathsWithFileNames = findAppPathsWithFileNames(conf.get(OozieClient.LIBPATH), "workflow.xml"); @@ -168,10 +169,11 @@ public class V1JobsServlet extends BaseJobsServlet { for (final String appPathWithFileName : appPathsWithFileNames) { final String sourceContent = conf.get(OozieClient.CONFIG_KEY_GENERATED_XML); if (sourceContent == null) { - throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0307, - String.format("Configuration entry %s not present", OozieClient.CONFIG_KEY_GENERATED_XML)); + final String errorMessage = String.format("App directory [%s] does not exist and " + + "app definition cannot be created because of missing config value [%s]", + appPath, OozieClient.CONFIG_KEY_GENERATED_XML); + throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0307, errorMessage); } - if (tryCreateOnDFS(userName, appPathWithFileName, sourceContent)) { return; } http://git-wip-us.apache.org/repos/asf/oozie/blob/4d2d799a/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 26ac7e9..4c209f4 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 5.1.0 release +OOZIE-3386 Misleading error message when workflow application does not exist (kmarton) OOZIE-3377 [docs] Remaining 5.1.0 documentation changes (andras.piros) OOZIE-3376 [tests] TestGraphGenerator should assume JDK8 minor version at least 1.8.0_u40 (andras.piros) OOZIE-3370 amend Property filtering is not consistent across job submission (andras.piros)