Thanks. It looks at first sight as if the message listener is being allowed to access the TinyTree document before it has been finalized. I'll take a look at this code path.

Michael Kay
Saxonica

On 16/05/2012 14:18, Cuzner Stephen P wrote:
Here is the full stack trace, but I've isolated it to processing of content from my MessageListener, which isn't very fancy, just set's out messages to go to log4j, but even sending to System.out.println, I get the failure. If I remove the Transformer.setMessageListener and let the default listener function, there is not failure. Note that this doesn't fail on all documents we process, only some. Here is the stack trace and the MessageListener code: