[
https://issues.apache.org/jira/browse/OOZIE-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15810839#comment-15810839
]
Dongying Jiao edited comment on OOZIE-2746 at 1/9/17 6:45 AM:
--------------------------------------------------------------
Hi:
I tried with branch 4.3.0.
find . -name xerces*.jar
./client/target/oozie-client-4.3.0-client/oozie-client-4.3.0/lib/xercesImpl-2.10.0.jar
./webapp/target/oozie-webapp-4.3.0/WEB-INF/lib/xercesImpl-2.10.0.jar
mvn -verison
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5;
2015-11-10T08:41:47-08:00)
Maven home: /root/apache-maven-3.3.9
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family:
"unix"
mvn clean test -Dtest=TestV2ValidateServlet#testValidateBundleNegative2
.....
Results :
Failed tests:
testValidateBundleNegative2(org.apache.oozie.servlet.TestV2ValidateServlet):
expected:<true> but was:<false>
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
......
>From surefire-reports:
...
org.apache.oozie.servlet.XServletException: E0701: XML schema error,
bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 123;
cvc-elt.1: Cannot find the declaration of element 'bundle-app-invalid'.
...
Thanks
was (Author: dongying jiao):
Hi:
I tried with branch 4.3.0.
# find . -name xerces*.jar
./client/target/oozie-client-4.3.0-client/oozie-client-4.3.0/lib/xercesImpl-2.10.0.jar
./webapp/target/oozie-webapp-4.3.0/WEB-INF/lib/xercesImpl-2.10.0.jar
# mvn -verison
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5;
2015-11-10T08:41:47-08:00)
Maven home: /root/apache-maven-3.3.9
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family:
"unix"
# mvn clean test -Dtest=TestV2ValidateServlet#testValidateBundleNegative2
.....
Results :
Failed tests:
testValidateBundleNegative2(org.apache.oozie.servlet.TestV2ValidateServlet):
expected:<true> but was:<false>
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
......
>From surefire-reports:
...
org.apache.oozie.servlet.XServletException: E0701: XML schema error,
bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 123;
cvc-elt.1: Cannot find the declaration of element 'bundle-app-invalid'.
...
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, 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.3.4#6332)