Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-6173

Transformer weighting algorithm fails to determine transformer with higher priority

    Details

    • User impact:
      High
    • Log Output:
      Hide
      Root Exception stack trace:
      org.mule.api.registry.ResolverException: There are two transformers that are an exact match for input: "class org.apache.xerces.dom.DocumentImpl", output: "class java.lang.String". Transformers are: "FileToString(class org.mule.transport.file.transformers.FileToString)" and "_DomDocumentToString(class org.mule.module.xml.transformer.DomDocumentToXml)"
      at org.mule.registry.TypeBasedTransformerResolver.getNearestTransformerMatch(TypeBasedTransformerResolver.java:162)
      at org.mule.registry.TypeBasedTransformerResolver.resolve(TypeBasedTransformerResolver.java:88)
      at org.mule.registry.MuleRegistryHelper.resolveTransformer(MuleRegistryHelper.java:266)
          + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
      Show
      Root Exception stack trace: org.mule.api.registry.ResolverException: There are two transformers that are an exact match for input: "class org.apache.xerces.dom.DocumentImpl", output: "class java.lang.String". Transformers are: "FileToString(class org.mule.transport.file.transformers.FileToString)" and "_DomDocumentToString(class org.mule.module.xml.transformer.DomDocumentToXml)" at org.mule.registry.TypeBasedTransformerResolver.getNearestTransformerMatch(TypeBasedTransformerResolver.java:162) at org.mule.registry.TypeBasedTransformerResolver.resolve(TypeBasedTransformerResolver.java:88) at org.mule.registry.MuleRegistryHelper.resolveTransformer(MuleRegistryHelper.java:266)     + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
    • Similar Issues:
    • Sprint:
      Studio Sprint 1

      Description

      The transformer weighting algorithm does not resolve the correct transformer in some situations.
      Apparently, when a transformer's source data type implements an interface.

      Example: when the attached config there are to transformers that match the transformation from DocumentImpl to String: FileToString and DomDocumentToXml.

      These are the types matched by each transformer:

      FileToString : DocumentImpl > CoreDocumentImpl > ParentNode > ChildNode > NodeImpl > Serializable
      DomDocumentToXml : DocumentImpl > CoreDocumentImpl > Document

      DomDocumentToXml matches a type that is near in the class hierarchy, however the algorithm determines that FileToString has higher priority weight.

        Attachments

          Activity

            People

            • Assignee:
              pablo.kraan Pablo Kraan
              Reporter:
              pablo.kraan Pablo Kraan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                4/Sep/12