[ https://issues.apache.org/jira/browse/OOZIE-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701206#comment-15701206 ]
Dongying Jiao commented on OOZIE-2159: -------------------------------------- Hi: Not sure if it is proper to post here. I backport this JIRA in oozie 4.2.0 release, but has several UT failures in TestV2ValidateServlet. >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. > 'oozie validate' command should be moved server-side > ---------------------------------------------------- > > Key: OOZIE-2159 > URL: https://issues.apache.org/jira/browse/OOZIE-2159 > Project: Oozie > Issue Type: New Feature > Affects Versions: trunk > Reporter: Robert Kanter > Assignee: Azrael Seoeun > Fix For: 4.3.0 > > Attachments: OOZIE-2159.1.patch, OOZIE-2159.2.patch, > OOZIE-2159.3.patch, OOZIE-2159.4.patch, OOZIE-2159.5.patch, OOZIE-2159.6.patch > > > The {{oozie validate}} command runs an XML validator against a workflow, > coordinator, or bundle XML file to check that it's valid with any of the XSD > schema files we have. > Currently, this is implemented in the Oozie CLI > ({{OozieCLI.validateCommand(...)}}, which has some downsides: > # It's only available to OozieCLI users; anyone using the REST API can't use > it > # It's currently hardcoded to the specific XSD files we ship with Oozie > ## Whenever we add a new schema, we have to also manually update this, which > is easy to forget > ## Users can't validate custom schemas that the Oozie server would accept > We should move this to the Oozie server, perhaps at a new "validate" > endpoint. It should be able to accept a local file path (the current > behavior) and perhaps also an HDFS file while we're at it. For the local XML > file, it can just be uploaded as part of the REST call. > Also, the description for the command needs to be updated to mention that it > also handles coordinators and bundles. -- This message was sent by Atlassian JIRA (v6.3.4#6332)