JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-6173

Transformer weighting algorithm fails to determine transformer with higher priority

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 3.1.3 (EE only), 3.2.2 (EE only), 3.3 RC3
  • Fix Version/s: 3.1.4 (EE only), 3.2.3 (EE only), 3.3.1
  • Component/s: Core: Transformers
  • Labels:
    • targeted-3.3.1
  • 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:
    None

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    two-transformers-config.xml
    18/Apr/12 06:29 PM
    1 kB
    Pablo Kraan
  2. Java Source File
    TwoTransformersTestCase.java
    18/Apr/12 06:29 PM
    2 kB
    Pablo Kraan

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Pablo Kraan added a comment - 27/Jul/12 05:09 PM

Fix 3.1.x
http://fisheye.codehaus.org/changelog/mule/?cs=24677
http://fisheye.codehaus.org/changelog/mule/?cs=24679

Fix 3.2.x
http://fisheye.codehaus.org/changelog/mule/?cs=24680

Fix 3.3.x
http://fisheye.codehaus.org/changelog/mule/?cs=24685

Fix 3.x
http://fisheye.codehaus.org/changelog/mule/?cs=24689

Show
Pablo Kraan added a comment - 27/Jul/12 05:09 PM Fix 3.1.x http://fisheye.codehaus.org/changelog/mule/?cs=24677 http://fisheye.codehaus.org/changelog/mule/?cs=24679 Fix 3.2.x http://fisheye.codehaus.org/changelog/mule/?cs=24680 Fix 3.3.x http://fisheye.codehaus.org/changelog/mule/?cs=24685 Fix 3.x http://fisheye.codehaus.org/changelog/mule/?cs=24689

People

  • Assignee:
    Pablo Kraan
    Reporter:
    Pablo Kraan
Vote (0)
Watch (0)

Dates

  • Created:
    18/Apr/12 06:27 PM
    Updated:
    27/Jul/12 05:10 PM
    Resolved:
    27/Jul/12 05:10 PM

Agile

  • Completed Sprint:
    Studio Sprint 1 ended 15/Feb/13
  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.