[ 
https://issues.apache.org/jira/browse/OOZIE-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406174#comment-13406174
 ] 

Robert Kanter commented on OOZIE-901:
-------------------------------------

I used --no-prefix.  

It looks like it's having a problem with ServletUtilities, where all I did was 
add an if statement and change an error message.  

This is what my ServletUtilities.ValidateAppPath() method looks like before 
applying the patch:
{code}
protected static void ValidateAppPath(String wfPath, String coordPath, String 
bundlePath) throws XServletException {
        int n = 0;
        
        if (wfPath != null) {
            n ++;
        }
        
        if (coordPath != null) {
            n ++;
        }
        
        if (bundlePath != null) {
            n ++;
        }
        
        if (n != 1) {
            throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, 
ErrorCode.E0302);
        }
    }
{code}
And this is what it looks like after:
{code}
protected static void ValidateAppPath(String wfPath, String coordPath, String 
bundlePath) throws XServletException {
        int n = 0;
        
        if (wfPath != null) {
            n ++;
        }
        
        if (coordPath != null) {
            n ++;
        }
        
        if (bundlePath != null) {
            n ++;
        }
        
        if (n == 0) {
            throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, 
ErrorCode.E0302, "a workflow, coordinator, or bundle app path is required");
        }
        
        if (n != 1) {
            throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, 
ErrorCode.E0302, "Multiple app paths specified, only one is allowed");
        }
    }
{code}

Does your ServletUtilities.ValidateAppPath() look like my "before" version?
                
> When Submitting a job without an app path, Oozie doesn't properly handle 
> multiple paths from oozie.libpath
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OOZIE-901
>                 URL: https://issues.apache.org/jira/browse/OOZIE-901
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Minor
>         Attachments: OOZIE-901-v2.patch, OOZIE-901.patch
>
>
> If you submit a job without at least one of app path, coordinator app path, 
> or bundle app path, Oozie will try to use oozie.libpath as the app path; but, 
> it just tries to take the entire oozie.libpath, even if it contains multiple 
> comma separated paths.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to