Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2400

Workflow xml configuration parser cannot deal with namespace prefix

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: trunk, 4.1.0, 4.2.0, 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: core
    • Labels:
    • Environment:

      Oracle Linux 6.6, Oozie 4.1.0, Cloudera CDH 5.4.2

    • Flags:
      Important

      Description

      When running a java action and a spark action via an oozie workflow xml, the xml contains multiple namespaces (e.g. uri:oozie:workflow:0.5 and uri:oozie:spark-action:0.1).
      Thus the elements need to be prefixed by the namespace prefix. But when running this workflow, the configuration parser throws the exception "JA009: bad conf file: top-level element not <configuration>".

      The bug is located in class org.apache.oozie.util.XConfiguration in methods "parseDocument(Document doc)" and "processNodes(Element root)". The xml tags here are retrieved via "getTagName()", (which gets the full tag name) and compared against string constants like "configuration". So this fails in case the tag contains a namespace prefix and it seems there is no workaround!

      Here is an easy fix for this. All calls of "getTagName()" in these 2 methods can be replaced by "getLocalName()".

        Attachments

        1. OOZIE-2400.3.patch
          8 kB
          Lars Francke
        2. OOZIE-2400.2.patch
          6 kB
          Lars Francke
        3. OOZIE-2400-1.patch
          4 kB
          Roman Krüger

          Activity

            People

            • Assignee:
              larsfrancke Lars Francke
              Reporter:
              bitmagier Roman Krüger
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified