Uploaded image for project: 'Apache Hop (incubating)'
  1. Apache Hop (incubating)
  2. HOP-2776

Search: harden against invalid XML in .hpl/.hwf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.99
    • 0.99
    • Hop Search
    • None

    Description

      When searching in an imported project I got this error:

       

      Unable to load transform info from XMLUnable to load transform info from XMLName is null
       at org.apache.hop.pipeline.transforms.userdefinedjavaclass.UserDefinedJavaClassMeta.readData(UserDefinedJavaClassMeta.java:491) at org.apache.hop.pipeline.transforms.userdefinedjavaclass.UserDefinedJavaClassMeta.loadXml(UserDefinedJavaClassMeta.java:347) at org.apache.hop.pipeline.transform.TransformMeta.<init>(TransformMeta.java:226) ... 12 moreCaused by: java.lang.NullPointerException: Name is null at java.lang.Enum.valueOf(Enum.java:236) at org.apache.hop.pipeline.transforms.userdefinedjavaclass.UserDefinedJavaClassDef$ClassType.valueOf(UserDefinedJavaClassDef.java:27) at org.apache.hop.pipeline.transforms.userdefinedjavaclass.UserDefinedJavaClassMeta.readData(UserDefinedJavaClassMeta.java:414) ... 14 more

      This is caused by a rename of the XML properties in that transform XML.

      Old names (UserDefinedJavaClassDef.java) in the step code:

        public enum ElementNames {
          class_type, class_name, class_source, definitions, definition, fields, field, field_name, field_type,
            field_length, field_precision, clear_result_fields,      info_steps, info_step, info_, target_steps, target_step, target_,      step_tag, step_name, step_description,      usage_parameters, usage_parameter, parameter_tag, parameter_value, parameter_description,
        }
      

      New names ...

      classType and so on...  This causes the XML loading to break. It's best to stick with the classical naming scheme in the XML.

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mcasters Matt Casters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m