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

Dongying Jiao edited comment on OOZIE-2746 at 11/30/16 3:54 AM:
----------------------------------------------------------------

Hi:
I think the JDK version I use is 1.8. 
In oozie/pom.xml: <targetJavaVersion>1.6</targetJavaVersion>

$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-11T00:41:47+08:00)
Maven home: /Users/jiaodongying/maven/apache-maven-3.3.9
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.5", arch: "x86_64", family: "mac"

I run test cases via mvn command in terminal.
The failed test cases in TestV2ValidateServlet.java in my environment are:
testValidateBundle
testValidateBundleNegative1
testValidateBundleNegative2
testValidateCoordinator
testValidateCoordinatorNegative1

After apply the patch, all can pass except testValidateBundleNegative2 in my 
environment.
Because the following code in this test case: assertEquals(true, 
message.contains("cvc-elt.1.a: Cannot find the declaration of element 
'bundle-app-invalid"));
If I also modify cvc-elt.1.a to cvc-elt.1 in this line, this case can pass.
But I didn't modify it in this patch because I am afraid it may fail in other 
environment.

Thanks


 


was (Author: dongying jiao):
Hi:
I think the JDK version is 1.6. In oozie/pom.xml:
<targetJavaVersion>1.6</targetJavaVersion>

The failed test cases in TestV2ValidateServlet.java in my environment are:
testValidateBundle
testValidateBundleNegative1
testValidateBundleNegative2
testValidateCoordinator
testValidateCoordinatorNegative1

After apply the patch, all can pass except testValidateBundleNegative2 in my 
environment.
Because the following code in this test case: assertEquals(true, 
message.contains("cvc-elt.1.a: Cannot find the declaration of element 
'bundle-app-invalid"));
If I also modify cvc-elt.1.a to cvc-elt.1 in this line, this case can pass.
But I didn't modify it in this patch because I am afraid it may fail in other 
environment.

Thanks


 

> 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
>
>
> 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:
> 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'.
> If I modify validate(String xml) function in V2ValidateServlet.java from :
> if (!e.getMessage().contains("cvc-elt.1.a"))
> { exception = e; break; }
> to:
> if (!e.getMessage().contains("cvc-elt.1"))
> { exception = e; break; }
> 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.3.4#6332)

Reply via email to