commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhys D Ulerich <r...@us.ibm.com>
Subject [SCXML] Unable to use custom action named 'send' in custom namespace
Date Tue, 07 Nov 2006 00:28:14 GMT
Hi all,

Just wanted to report that using a custom action <something:send> for an 
XML namespace different than SCXML's default causes trouble. Specifically, 
having the backing Action class implement ExternalContent causes problems. 
 The <something:send> element matches just like it is a normal 
<scxml:send> element and the Digester rules barf--

java.lang.ClassCastException: org.apache.xerces.dom.ElementNSImpl 
incompatible with org.apache.commons.scxml.model.ExternalContent^M
    at 
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule.end(SCXMLDigester.java:1234)^M
    at 
org.apache.commons.digester.Digester.endElement(Digester.java:1130)^M
    at 
org.apache.commons.digester.NodeCreateRule$NodeBuilder.endElement(NodeCreateRule.java:195)^M
    at 
org.apache.commons.digester.Digester.endElement(Digester.java:1064)^M
    at 
org.apache.commons.digester.NodeCreateRule$NodeBuilder.endElement(NodeCreateRule.java:195)^M
    at 
org.apache.commons.digester.Digester.endElement(Digester.java:1064)^M
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)^M
    at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)^M
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)^M
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)^M
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)^M
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)^M
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)^M
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)^M
    at org.apache.commons.digester.Digester.parse(Digester.java:1704)^M
    at 
org.apache.commons.scxml.io.SCXMLDigester.digest(SCXMLDigester.java:229)^M
    ...

The offending Digester trace looks like

Fire begin() for SetPropertiesRule[]^M
[SetPropertiesRule]{scxml/state/onentry/send} Set 
com.ibm.SCRUBBED.SendAction properties^M
BeanUtils.populate([com.ibm.SCRUBBED.SendAction@25c825c8;hasInitialized=false;externalNodes=[]],

{})^M
Fire begin() for SetNextRule[methodName=addAction, paramType=null]^M
Fire begin() for 
org.apache.commons.scxml.io.SCXMLDigester$SetExecutableParentRule@22cc22cc^M
Fire begin() for 
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule@22de22de^M
endElement(http://www.ibm.com/schema/SCRUBBED/actions/v0_1,send,SCRUBBED:send)^M
match='scxml/state/onentry/send'^M
bodyText=''^M
Fire body() for 
ObjectCreateRule[className=org.apache.commons.scxml.model.Send, 
attributeName=null]^M
Fire body() for SetPropertiesRule[]^M
Fire body() for SetNextRule[methodName=addAction, paramType=null]^M
Fire body() for 
org.apache.commons.scxml.io.SCXMLDigester$SetExecutableParentRule@5f805f8^M
Fire body() for 
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule@60a060a^M
Fire body() for ObjectCreateRule[className=com.ibm.SCRUBBED.SendAction, 
attributeName=null]^M
Fire body() for SetPropertiesRule[]^M
Fire body() for SetNextRule[methodName=addAction, paramType=null]^M
Fire body() for 
org.apache.commons.scxml.io.SCXMLDigester$SetExecutableParentRule@22cc22cc^M
Fire body() for 
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule@22de22de^M
Popping body text '
            '^M
Fire end() for 
org.apache.commons.scxml.io.SCXMLDigester$ParseExternalContentRule@22de22de^M

You can see where the org.apache.commons.scxml.model.Send class gets into 
the mix.  Not using 'send' as the localName of my custom action solved the 
problem.

- Rhys
_______________________________________
Rhys Ulerich
WebSphere IMS/SIP SOA Enablement Developer
Email: rhys@us.ibm.com  Office: 512-838-1428
IBM Software Group - Austin, TX

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message