Looks like JMeter is hardcoded to use Xalan. I tried supplying the property 

-Djavax.xml.xpath.XPathFactory=net.sf.saxon.xpath.XPathFactoryImpl 

but it still used Xalan. When I removed Xalan from JMeters lib folder the 
following exception is seen in jmeter.log: 

2009/07/21 09:21:25 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.NoClassDefFoundError: org/apache/xpath/XPathAPI 
at 
org.apache.jmeter.assertions.XPathAssertion.getResult(XPathAssertion.java:127) 
at 
org.apache.jmeter.threads.JMeterThread.checkAssertions(JMeterThread.java:511) 
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:300) 
at java.lang.Thread.run(Thread.java:619) 
Caused by: java.lang.ClassNotFoundException: org.apache.xpath.XPathAPI 
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:188) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:307) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:252) 
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) 
... 4 more 

Is possible to achieve this task with JMeter 2.3.4? If not, I will log an 
improvement in bugzilla . 

Regards, 
Noel 

----- "Deepak Shetty" <[email protected]> wrote: 
> sorry my mistake , it should be XPathFactory (and is only available from 
> JDK1.5) so I dont think Saxon can be plugged in without code change 
> regards 
> deepak 
> 
> 
> On Mon, Jul 20, 2009 at 10:01 AM, Noel O'Brien <[email protected]> wrote: 
> 
> > Hi, 
> > 
> > Thanks for your input Deepak. I'll give it a go and report back my findings 
> > 
> > Regards, 
> > Noel 
> > 
> > ----- "Deepak Shetty" <[email protected]> wrote: 
> > > Hi 
> > > Im not sure how JMeter works , but see if the 
> > > 
> > -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
> >  
> > > can be used to specify the engine to be used for XSLT 
> > > 
> > > If Jmeter is using JAXP you could probably use whichever engine you want 
> > to 
> > > run the XPATH , if its using Xalan directly then short of writing your 
> > own 
> > > extension (or using BeanShell/Java samplers) I cant see any other way 
> > > regards 
> > > deepak 
> > > 
> > > On Mon, Jul 20, 2009 at 3:24 AM, Noel O'Brien <[email protected]> 
> > wrote: 
> > > 
> > > > After further investigation, it appears Xalan does not yet support 
> > > > XSLT/XPath 2.0, and it doesn't look like there's much activity in it's 
> > > > implementation. 
> > > > 
> > > > Saxon-B 9.1 on the other hand supports XSLT/XPath 2.0. Are there any 
> > plans 
> > > > to include Saxon in JMeter? If not, is it much work to substitute Saxon 
> > for 
> > > > Xalan in JMeter 2.3.2? 
> > > > 
> > > > Regards, 
> > > > Noel 
> > > > 
> > > > ----- "Noel O'Brien" <[email protected]> wrote: 
> > > > > Hi, 
> > > > > 
> > > > > I'm trying to use the XPath function "matches()" in my XPath 
> > assertions, 
> > > > but getting the following: 
> > > > > 
> > > > > Assertion failure message : TransformerException: Could not find 
> > > > function: matches for:matches(/feed/entry/link[1]/@href, ......) 
> > > > > 
> > > > > It looks like JMeter is invoking an XSLT 1.0 processor. Is it 
> > possible to 
> > > > add an XSLT 2.0 processor ? If so how can it be done? 
> > > > > 
> > > > > JMeter version:2.3.2 
> > > > > Java Version: 1.6.0_12 
> > > > > OS: Linux 
> > > > > 
> > > > > -- 
> > > > > Regards, 
> > > > > Noel 
> > > > > 
> > > > 
> > > > -- 
> > > > Regards, 
> > > > Noel 
> > > > 
> > > 
> > 
> 

Reply via email to