Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6820

Issue with escaping characters in Camel Smooks Component

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      I have attached a Smooks_Reproducer file which has the sample project to reproduce the issue.

      1) Import the sample project in your workspace.
      2) Change the value for key "FILENAME" in class "Readfile.java" (Path to file EDIMessage.txt)
      3) The input message is in the zip file as "EDIMessage.txt"
      4) Install smooks feature in Fuse "features:install smooks"
      5) Set the logs to DEBUG level "log:set DEBUG"
      6) Build and install the reproducer

      You would be able to see some of the parsed messages and followed by the error.

      Show
      I have attached a Smooks_Reproducer file which has the sample project to reproduce the issue. 1) Import the sample project in your workspace. 2) Change the value for key "FILENAME" in class "Readfile.java" (Path to file EDIMessage.txt) 3) The input message is in the zip file as "EDIMessage.txt" 4) Install smooks feature in Fuse "features:install smooks" 5) Set the logs to DEBUG level "log:set DEBUG" 6) Build and install the reproducer You would be able to see some of the parsed messages and followed by the error.

      Description

      Smooks transformation fails when the EDI message contains the escape character followed by the delimiter (').

      A EDI message sent with and escape character and the delimiter adjacent to each other, the EDI parser fails to parse the data throwing the following error:

      2017-05-12 14:30:12,307 | DEBUG | #8 - timer://foo | DefaultErrorHandler | 198 - org.apache.camel.camel-core - 2.15.1.redhat-621084 | Failed delivery for (MessageId: ID-pchhabra-pnq-csb-45614-1494522812078-6-1 on ExchangeId: ID-pchhabra-pnq-csb-45614-1494522812078-6-2). On delivery attempt: 0 caught: org.milyn.SmooksException: Failed to filter source.

        Attachments

        1. milyn-smooks-all-1.5.2-patch.jar
          1.91 MB
        2. Smooks_Reproducer.zip
          18 kB
        3. smooks.patch
          38 kB

          Activity

            People

            Assignee:
            tcunning Thomas Cunningham
            Reporter:
            rhn-support-pchhabra Pulkit Chhabra (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: