Bug 780684 (SOA-3131) - SmooksAction / ContentBasedRouter fails with input data containing a byte order mark (BOM)
Summary: SmooksAction / ContentBasedRouter fails with input data containing a byte ord...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-3131
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0 GA,5.2.0.ER4
Assignee: Tom Fennelly
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-28 13:28 UTC by Martin Weiler
Modified: 2011-11-09 11:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-09 11:10:50 UTC
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBESB-3649 0 Blocker Closed Add a Byte Order Mark (BOM) filtering action 2014-01-16 11:19:33 UTC
Red Hat Issue Tracker SOA-3131 0 Major Closed SmooksAction / ContentBasedRouter fails with input data containing a byte order mark (BOM) 2014-01-16 11:19:33 UTC

Description Martin Weiler 2011-06-28 13:28:33 UTC
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 13:32:17 UTC
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 13:32:17 UTC
Attachment: Added: DslHelperBomUnitTest.java


Comment 3 Anne-Louise Tangring 2011-07-11 20:09:14 UTC
Candidate for SOA 5.2.

Comment 4 David Le Sage 2011-07-15 05:45:18 UTC
Release Notes Docs Status: Added: Not Yet Documented
Writer: Added: dlesage


Comment 5 tcunning 2011-07-27 21:15:58 UTC
Link: Added: This issue relates to JBESB-3649


Comment 6 trev 2011-09-08 12:39:20 UTC
Tom Fennelly thinks that an ESB fix in the SmooksAction will solve this

Comment 7 Tom Fennelly 2011-09-14 16:53:17 UTC
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 10:16:34 UTC
Fixed in ESB

Comment 9 David Le Sage 2011-09-27 22:41:30 UTC
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 13:28:32 UTC
This is still an issue. Attached a quickstart to reproduce. Simple run ant deploy, ant runtest

Comment 11 Martin Vecera 2011-11-04 13:28:59 UTC
Attachment: Added: transform_XML2POJO.tar.bz2


Comment 12 tcunning 2011-11-04 14:12:25 UTC
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 14:13:28 UTC
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 15:28:04 UTC
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 11:10:50 UTC
This is really verified in ER6.


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