Obviously this means very little to me without knowing more about your application design (or JBoss, for that matter).
 
The key questions are: where is the Transformer instantiated, where is it used, and is there any possibility that the same Transformer can be invoked more than once?
 
If you want to attempt some diagnostics, try supplying an ErrorListener which casts the Exception to an XPathException, gets the XPathContext, and from this the Controller:
 
((XPathException).getXPathContext().getController()
 
This should tell you whether two failing threads are using the same Controller.
 
Michael Kay
http://www.saxonica.com/


From: Anton Mints [mailto:developer.geo@yahoo.com]
Sent: 19 July 2006 22:43
To: 'Michael Kay'; 'Mailing list for SAXON XSLT queries'
Cc: 'Ernst Nolte'; 'Dmitry Krambalev'
Subject: RE: [saxon] Saxon 8.7 Transformer problem - JBOSS - XSLT2.0

Even it’s a message driven bean, this is sequential processing of message in EAR component deployed as High Available singleton. So there is only one thread possible. There are however two transformations, first we are transforming the raw fix data to the xml (you saw the message), then calling the transformer to transform the intermediate result to FIXML, where it’s failing. Every time, we are creating a new instance of the Saxon.

 

Obviously, there are other serializations/transformations in parallel, but they are running in separate components/containers and normally should not influence this EAR module.

 

Even to be on the save side, we have added Synchronize around entire serialization as flowing:

 

logger.debug("Message processed into FIXML (" + JMSMessageID + ")");

String fixData = null;

synchronized (serializerLock) {

fixData = FixML2Fix(fixml, JMSMessageID);

}

 

Without synchronization it was complaining about msgs variable, after we have added this serialization it started about qf. However again, it’s HA Singleton, so no multithreading.

 

Anton

 


From: Michael Kay [mailto:mike@saxonica.com]
Sent: Wednesday, July 19, 2006 11:16 PM
To: 'Mailing list for SAXON XSLT queries'
Cc: 'Anton Mints'; 'Ernst Nolte'; 'Dmitry Krambalev'
Subject: FW: [saxon] Saxon 8.7 Transformer problem - JBOSS - XSLT2.0

 

 

Thanks. Well, the variable definition clearly isn't circular, so we have to look for a deeper cause. I suspect some kind of multi-threading issue. Saxon holds a flag that indicates the variable is being evaluated, and the error means that an attempt is being made to evaluate the variable when this flag is already set. The flag is contained in the JAXP Transformer object, so a possible explanation is that the Transformer is being used in more than one thread (which isn't allowed). I notice that net.sf.saxon.Controller (which is Saxon's implementation of the JAXP Transformer) is mentioned in the ClassLoader message, so this might be a hint that things are amiss in this area.

 

Note that because the variable calls the doc() function to load and parse a source document, evaluation of the variable might take some time, so it's quite likely that if there is a threading conflict here, this is where it would be detected. 

 

Does this ring any bells?

 

Michael Kay

http://www.saxonica.com/