You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Attila Sasvari (JIRA)" <ji...@apache.org> on 2017/08/14 10:22:01 UTC

[jira] [Commented] (OOZIE-2746) Several tests failure in TestV2ValidateServlet.java

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

Attila Sasvari commented on OOZIE-2746:
---------------------------------------

[~rkanter] [~abhishekbafna] I have seen this issue for [coordinator xml validation|https://issues.cloudera.org/browse/DISTRO-826] as well. When the oozie server loaded classes from an older xercesImpl, {{oozie validated coordinator.xml}} failed with the error message in the description.

The patch can be considered as a quick fix, but I believe it would be better to implement a more general approach like [OOZIE-2965|https://issues.apache.org/jira/browse/OOZIE-2965].

> Several tests failure in TestV2ValidateServlet.java
> ---------------------------------------------------
>
>                 Key: OOZIE-2746
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2746
>             Project: Oozie
>          Issue Type: Test
>          Components: tests
>    Affects Versions: 4.2.0
>            Reporter: Dongying Jiao
>         Attachments: OOZIE-2746-1.patch, OOZIE-2746-2.patch, OOZIE-2746-3.patch, OOZIE-2746-4.patch
>
>
> I backport JIRA {{OOZIE-2159 : 'oozie validate' command should be moved server-side}} in oozie 4.2.0 release, but has several UT failures in TestV2ValidateServlet. 
> For example:
> From UT output of TestV2ValidateServlet#testValidateBundle:
> {noformat}
> error[E0701], E0701: XML schema error, bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 115; cvc-elt.1: Cannot find the declaration of element 'bundle-app'.
> org.apache.oozie.servlet.XServletException: E0701: XML schema error, bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 115; cvc-elt.1: Cannot find the declaration of element 'bundle-app'.
> {noformat}
> If I modify validate(String xml) function in V2ValidateServlet.java from :
> {code}
> if (!e.getMessage().contains("cvc-elt.1.a"))
> { exception = e; break; }
> {code}
> to:
> {code}
> if (!e.getMessage().contains("cvc-elt.1"))
> { exception = e; break; }
> {code}
> Then this UT can pass.
> I wonder what is the difference between exception message {{cvc-elt.1}} and {{cvc-elt.1.a}}.
> Why {{cvc-elt.1}} is generated from my environment instead of {{cvc-elt.1.a}}?
> Thanks very much.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)