Bug 780684 - (SOA-3131) SmooksAction / ContentBasedRouter fails with input data containing a byte order mark (BOM)
SmooksAction / ContentBasedRouter fails with input data containing a byte ord...
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.1.0 GA
Unspecified Unspecified
high Severity high
: ---
: 5.2.0 GA,5.2.0.ER4
Assigned To: Tom Fennelly
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-28 09:28 EDT by Martin Weiler
Modified: 2011-11-09 06:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-09 06:10:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
DslHelperBomUnitTest.java (3.68 KB, text/x-java)
2011-06-28 09:32 EDT, Martin Weiler
no flags Details
transform_XML2POJO.tar.bz2 (10.63 KB, application/x-bzip)
2011-11-04 09:28 EDT, Martin Vecera
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3649 Blocker Closed Add a Byte Order Mark (BOM) filtering action 2014-01-16 06:19:33 EST
JBoss Issue Tracker SOA-3131 Major Closed SmooksAction / ContentBasedRouter fails with input data containing a byte order mark (BOM) 2014-01-16 06:19:33 EST

  None (edit)
Description Martin Weiler 2011-06-28 09:28:33 EDT
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000007CFSA
Workaround Description: - Add the message content as byte[] representation instead of a String OR
- Manually remove the BOM from the content before invoking other actions
project_key: SOA

Calling a SmooksAction or a ContentBasedRouter with XML data with a preceding BOM, causes it to fail with a 'Content is not allowed in prolog' error.
Comment 1 Martin Weiler 2011-06-28 09:32:17 EDT
Attaching a test case which can be used to reproduce this issue. Note that - despite the same input data - the results are different depending on how the data is added to the message.
Comment 2 Martin Weiler 2011-06-28 09:32:17 EDT
Attachment: Added: DslHelperBomUnitTest.java
Comment 3 Anne-Louise Tangring 2011-07-11 16:09:14 EDT
Candidate for SOA 5.2.
Comment 4 David Le Sage 2011-07-15 01:45:18 EDT
Release Notes Docs Status: Added: Not Yet Documented
Writer: Added: dlesage
Comment 5 tcunning 2011-07-27 17:15:58 EDT
Link: Added: This issue relates to JBESB-3649
Comment 6 trev 2011-09-08 08:39:20 EDT
Tom Fennelly thinks that an ESB fix in the SmooksAction will solve this
Comment 7 Tom Fennelly 2011-09-14 12:53:17 EDT
I think this needs to be handled outside Smooks (or other components - Smooks is not the only thing that's going to suffer at the hands of this).

I think data buffers/streams containing a BOM need to preprocessed before passing into other components.  Otherwise, we'll need to code BOM filtering logic into everything.  Wouldn't it make more sense to provide an ESB Action that can perform preprocessing on the buffer/stream, stripping off the BOM?
Comment 8 Douglas Palmer 2011-09-20 06:16:34 EDT
Fixed in ESB
Comment 9 David Le Sage 2011-09-27 18:41:30 EDT
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: https://issues.jboss.org/browse/SOA-3131

ContentBasedRouter failed when input data contained a byte-order mark (BOM). A fix has been applied to the enterprise service bus to ensure that byte-order marks can now be handled by the software so users will no longer see this failure.
Comment 10 Martin Vecera 2011-11-04 09:28:32 EDT
This is still an issue. Attached a quickstart to reproduce. Simple run ant deploy, ant runtest
Comment 11 Martin Vecera 2011-11-04 09:28:59 EDT
Attachment: Added: transform_XML2POJO.tar.bz2
Comment 12 tcunning 2011-11-04 10:12:25 EDT
Release Notes Text: Removed: https://issues.jboss.org/browse/SOA-3131

ContentBasedRouter failed when input data contained a byte-order mark (BOM). A fix has been applied to the enterprise service bus to ensure that byte-order marks can now be handled by the software so users will no longer see this failure. Added: https://issues.jboss.org/browse/SOA-3131

ContentBasedRouter failed when input data contained a byte-order mark (BOM). A new ESB BOMFilter action has been added to the enterprise service bus that is able ensure that byte-order marks can now be handled by the software so users will no longer see this failure.     The BOMFilter action should be added to the action-chain in order to filter out byte order marks.
Comment 13 tcunning 2011-11-04 10:13:28 EDT
Talked to Martin about this one - the fix here was to add a BOMFilter ESB action that can filter out byte order marks, because BOMs are not a smooks-specific issue.     Changed the release notes to reflect the actual fix here.
Comment 14 Martin Vecera 2011-11-08 10:28:04 EST
Unfortunatelly, the class for BOMFilter action is not present in product build. Originally I took it from a wrong place. Sorry for the confusion.
Comment 15 Martin Vecera 2011-11-09 06:10:50 EST
This is really verified in ER6.

Note You need to log in before you can comment on or make changes to this bug.