commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Herring <>
Subject [SCXML] Modifying classloader for SCXML digester?
Date Thu, 28 Jan 2010 18:16:04 GMT
I'm developing an Eclipse plugin application and have Commons SCXML  
and Digester in a plugin/bundle separate from my main project bundle.   
The problem with this is that if I'm submitting a list of custom  
actions to SCXMLParser.parse() the classloader that digester is using  
can't find the custom action classes and throws an exception.  The  
offending line is in digester.ObjectCreateRule.begin():

      Class<?> clazz =  

The docs for getClassLoader() indicate that I can use setClassLoader()  
to use another class loader, which might solve my problem.  However, I  
can't find a simple way to invoke that function before  
SCXMLParser.parse() generates the error.  I can use  
SCXMLParser.getInstance() to get a digester instance, and then I can  
call setClassLoader() and then invoke parse() on the digester  
directly. Doing that, I have to set up the digester rules manually  
before parsing, which appears doable but non-trivial...

Is there a simpler way to coax the digester used in  
SCXMLParser.parse() to employ a different class loader?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message