Project

Profile

Help

XPDY0002 error when running concurrent

Added by Anonymous almost 17 years ago

Legacy ID: #4429354 Legacy Poster: inkinen (inkinen)

Hello, Im quite new to saxon, and I have a problem when running two or more transforms on a single dom-tree at the same time. Is this not possible in saxon 8.9? i invoke the transform using jstl tags. the error i get is Error on line 34 of jstl:: XPDY0002: The context item for axis step child::element({http://lubas.lu.se/guInfoextensions}guSubject) is undefined javax.servlet.jsp.JspException: The context item for axis step child::element({http://lubas.lu.se/guInfoextensions}guSubject) is undefined it works fine when running as a single user doing the transform. when running with two or more users ( i use opensta to do loadtesting ) it crashes like this. usually it works for like 20 nodes, but then these errors start popping up here and there. any ideas? best regards


Replies (3)

Please register to reply

RE: XPDY0002 error when running concurrent - Added by Anonymous almost 17 years ago

Legacy ID: #4430430 Legacy Poster: Michael Kay (mhkay)

You haven't given very much information to be going on. My guess (sorry if it's wildly wrong) is that you've tried to use the same Transformer in more than one thread. That's expressly not allowed. You should create a single Templates object to represent the compiled stylesheet, and then you can execute it in as many threads as you like, creating one Transformer in each thread (one for each transformation).

RE: XPDY0002 error when running concurrent - Added by Anonymous almost 17 years ago

Legacy ID: #4430898 Legacy Poster: inkinen (inkinen)

Hi Michael, Thanks for the quick reply! I was in a little hurry when writing so i missed some information. i use the following: jdk 1.5.0_04 tomcat 5.x saxon 8.9 linux 2.4.21-47.ELsmp i686 athlon i386 GNU/Linux Anyway, I have setup saxon to be used in a webapplication that makes use of jstl xml tags such as x:transform and so on. Before I run the transformation I also do System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); so it will use saxon instead of xalans transformer. the xsl is generated dynamically (the user asks for all nodes that contain a specific subject) for each request and then its passed to the x:transform tags together with three domtrees (xmlInfoDoc, strippedXmlEventDoc and englishInstructionLanguageNodes) that are stored in the applicationscope in tomcats memory : <x:transform xml="${xmlInfoDoc}" xslt="${xslt}"> <x:param name="events" value="${strippedXmlEventDoc}"/> <x:param name="englishEvents" value="${englishInstructionLanguageNodes}"/> </x:transform> maybe this is not on topic but i think the x:transform/jstl part takes care of setting up the Transformer object, and then this is shared between all requests.

RE: XPDY0002 error when running concurrent - Added by Anonymous almost 17 years ago

Legacy ID: #4430989 Legacy Poster: Michael Kay (mhkay)

I don't have any experience with jstl. It looks to me like a jstl problem. I've raised a question on the xsl-list at mulberrytech.com to ask if other users have experience of this. Depending on the response, I'll take it up with Sun. I suggest you join the xsl-list thread.

    (1-3/3)

    Please register to reply