commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslav Pullmann <jaroslav.pullm...@fit.fraunhofer.de>
Subject [SCXML] XPathEvaluator / Error accessing complex event payload
Date Sun, 25 Oct 2009 15:47:05 GMT
  Hello Rahul,
  although not yet officially released I like using the J6 branch
  (commons-scxml-1.0-SNAPSHOT.jar) because of its XPath support.
  Recently I experience problems when accessing the complex event
  payload (Node: <payload><data><status>started</status></data></payload>,
  plain string payload is o.k.)

  This works fine with JexlEvaluator:

	<transition event="statuschange">
		<log label="Status changed to" expr="Data(_eventdata.payload,'/data/status')"/>
	</transition>

  but is broken with XPathEvaluator:

	<transition event="statuschange">
		<log label="Message" expr="$_eventdata/data/status"/>
	</transition>


javax.xml.transform.TransformerException: org.apache.xpath.objects.XObject incompatible with

org.apache.xpath.objects.XNodeSet
	at org.apache.xpath.XPath.execute(Unknown Source)
	at org.apache.xpath.jaxp.XPathExpressionImpl.evaluate(Unknown Source)
	at org.apache.xpath.jaxp.XPathImpl.evaluate(Unknown Source)
	at org.apache.commons.scxml.env.xpath.XPathEvaluator.eval(XPathEvaluator.java:90)
	at org.apache.commons.scxml.model.Log.execute(Log.java:107)
	at org.apache.commons.scxml.semantics.SCXMLSemanticsImpl.executeActions(SCXMLSemanticsImpl.java:223)
	at org.apache.commons.scxml.SCXMLExecutor.triggerEvents(SCXMLExecutor.java:131)
	
Caused by: java.lang.ClassCastException: org.apache.xpath.objects.XObject incompatible with

org.apache.xpath.objects.XNodeSet
	at org.apache.xpath.axes.FilterExprIteratorSimple.executeFilterExpr(Unknown Source)
	at org.apache.xpath.axes.FilterExprWalker.setRoot(Unknown Source)
	at org.apache.xpath.axes.WalkingIterator.setRoot(Unknown Source)
	at org.apache.xpath.axes.NodeSequence.setRoot(Unknown Source)
	at org.apache.xpath.axes.LocPathIterator.execute(Unknown Source)
	... 13 more


	Is this may be due to an incorrect variable naming or whichever user error ?

     Many thanks for your help!
       Jaro


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message