ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XSLT Transformation node throwing transformation error

Post new topic  Reply to topic
 XSLT Transformation node throwing transformation error « View previous topic :: View next topic » 
Author Message
letmecheck
PostPosted: Fri Jun 17, 2011 8:12 am    Post subject: XSLT Transformation node throwing transformation error Reply with quote

Novice

Joined: 27 May 2011
Posts: 12

I have an xlst transformation which actually validates the XML Elements and if the validation fails, it sets the terminate='yes' and set the xsl:message.

<xsl:message terminate="yes">ER=ERR300,TEXT=Invalid OrderID for your order VALUE= <xsl:value-of select="$orderID"/>

Ideally, Whenever an <xsl:message> element is encountered, if the terminate flag is set to "yes", the XSLT processor should quit and I should get the exception with the what is specfied in the xsl message.Instead I am getting a transformaiton error. So cannot identify where the actual failure is.

Any help will be greately apprciated.
Thanks
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Jun 17, 2011 8:36 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

When you step through the translation in the debugger, what is the Exception that is being created by the XSL Transform node? If you put a trace node on the failure terminal with the pattern of ${ExceptionList} , what is the output?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
letmecheck
PostPosted: Fri Jun 17, 2011 10:22 am    Post subject: Reply with quote

Novice

Joined: 27 May 2011
Posts: 12

(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 616
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmJniNode'
(0x03000000):Name = 'Validation#FCMComposite_1_7'
(0x03000000):Label = 'Validation.XMLTransformation'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Node throwing exception'
(0x01000000):RecoverableException = (
(0x03000000):File = 'XMLTransformNode.java'
(0x03000000):Line = 996
(0x03000000):Function = 'transformData'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 4447
(0x03000000):Text = 'Error during transformation'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'XMLTransformation'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'Transformation failure when processing Stylesheet C:/test/Test_XML.xsl

CC=BR300,TEXT=Invalid service ID for test ordr VALUE= UNKNOWN_SERVICE_ID,SERVICE_ID=UNKNOWN_SERVICE_ID,MSG_ID=DH_3

ERROR: 'Termination forced by an xsl:message instruction'



javax.xml.transform.TransformerException: java.lang.RuntimeException: Termination forced by an xsl:message instruction

at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:609)

at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:282)

at com.ibm.xsl.exmlt.ParseFacilitator.parseXmlStylesheet(ParseFacilitator.java:676)

at com.ibm.xsl.exmlt.ParseFacilitator.parse(ParseFacilitator.java:253)

at com.ibm.xsl.exmlt.EnhancedXMLTransform.transformWithStylesheet(EnhancedXMLTransform.java:773)

at com.ibm.xsl.exmlt.EnhancedXMLTransform.transformDocument(EnhancedXMLTransform.java:706)

at com.ibm.xsl.mqsi.XMLTransformData.transformData(XMLTransformData.java:838)

at com.ibm.xsl.mqsi.XMLTransformNode.evaluate(XMLTransformNode.java:940)

at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1222)

Caused by: java.lang.RuntimeException: Termination forced by an xsl:message instruction
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Jun 17, 2011 10:36 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Looks like the data being passed into the XSL node is not in agreement with the stylesheet contract.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Fri Jun 17, 2011 4:46 pm    Post subject: Re: XSLT Transformation node throwing transformation error Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

letmecheck wrote:
Ideally, Whenever an <xsl:message> element is encountered, if the terminate flag is set to "yes", the XSLT processor should quit and I should get the exception with the what is specfied in the xsl message.

Instead I am getting a transformation error.

No, not "Instead ...". That should be "As a result ..."

The xslt terminate and resulting exception are causing the transformation error:

letmecheck wrote:
Code:
    (0x01000000):RecoverableException = (
      (0x03000000):File     = 'XMLTransformNode.java'
      (0x03000000):Catalog  = 'BIPv600'
      (0x03000000):Number   = 4447
      (0x03000000):Text     = 'Error during transformation'
      (0x01000000):Insert   = (
        (0x03000000):Type = 5
        (0x03000000):Text = 'XMLTransformation'
      )
      (0x01000000):Insert   = (
        (0x03000000):Type = 5
        (0x03000000):Text = 'Transformation failure when processing Stylesheet C:/test/Test_XML.xsl

CC=BR300,TEXT=Invalid service ID for test ordr VALUE= UNKNOWN_SERVICE_ID,SERVICE_ID=UNKNOWN_SERVICE_ID,MSG_ID=DH_3

ERROR:  'Termination forced by an xsl:message instruction'
...
javax.xml.transform.TransformerException: java.lang.RuntimeException: Termination forced by an xsl:message instruction
...
Caused by: java.lang.RuntimeException: Termination forced by an xsl:message instruction
...
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Jun 19, 2011 3:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So what you're saying is that you are receiving an exception when you are expcting the XSTLTransformation node to complete successfully (albeit producing an error).

If you can demonstrate this, and confirm that it is illegal behavior for a conforming XSLT engine at the version of XSLT that Broker supports (at your level of broker), then you should open a PMR.
Back to top
View user's profile Send private message
letmecheck
PostPosted: Mon Jun 20, 2011 6:59 am    Post subject: Reply with quote

Novice

Joined: 27 May 2011
Posts: 12

I have the broker version 6.0.0.1 installed where this xslt issue is experienced
Back to top
View user's profile Send private message
letmecheck
PostPosted: Mon Jun 20, 2011 7:08 am    Post subject: Reply with quote

Novice

Joined: 27 May 2011
Posts: 12

Has anyone got the same version of broker and experienced this issue, or atleast worked xslt with 'terminate=yes' and did not encounter any transformation issue.

thanks
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jun 20, 2011 7:18 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

letmecheck wrote:
I have the broker version 6.0.0.1 installed where this xslt issue is experienced


Which is out of support. (As of May 1st 2011)
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
paintpot
PostPosted: Mon Jun 20, 2011 8:34 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

and what happens when you test this outside of Broker - e.g. using a Java wrapper - with the same data?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 20, 2011 8:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

At a bare minimum, upgrade to the last released fixpack of Broker 6.0. that's 6.0.0.10 afaik.

Realistically, uninstall Broker 6.0 and start over with Broker 7.0.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Jun 20, 2011 8:18 pm    Post subject: Re: XSLT Transformation node throwing transformation error Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

letmecheck wrote:
Has anyone ... worked xslt with 'terminate=yes' and did not encounter any transformation issue.

When the XML Transformation node processes an <xsl:message terminate='yes' ...> instruction, it:
  • sends the xsl:message somewhere
  • terminates processing of the stylesheet
  • throws an Exception, which includes both the xsl:message and the reason for termination
That's the expected behavior. That's the actual behavior. Please explain more clearly why this is a problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XSLT Transformation node throwing transformation error
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.