You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Gromadusi <gr...@gmail.com> on 2009/09/04 17:09:21 UTC

Jmeter 2.3.4 - XPath Extractor - Error getting DTD

Hi,

I'm trying to run a simple XPath extraction (something like //li/a[@href]
through a html document by the help of the 'XPath Extractor' Post Processor.

It does not work, and all i get from the jmeter.log is

2009/09/04 13:25:18 ERROR - jmeter.threads.JMeterThread: Test failed!
org.apache.jorphan.util.JMeterError: error on (//li/a[@href])
    at
org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:110)
    at
org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:590)
    at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:347)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:239)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 503 for
URL: http://www.w3.org/TR/html4/strict.dtd
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
    at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at org.apache.jmeter.util.XPathUtil.makeDocument(XPathUtil.java:167)
    at
org.apache.jmeter.extractor.XPathExtractor.parseResponse(XPathExtractor.java:221)
    at
org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:105)

How I interpret the line 'Caused by: java.io.IOException: Server returned
HTTP response code: 503 for URL: http://www.w3.org/TR/html4/strict.dtd' is
that Jmeter tries to validate my XPath expression based on this dtd, but
Jmeter (or the user agent it pretents to be) is not allowed to fetch that
document.
I already tried to set the user agent (by using the HTTP Header Manager) to
my current FF installation which definately IS able to download that dtd,
but no success.

I'd be interested in turning off that validation completely, OR pointing to
a local copy of it...and again, haven't found any info whatsoever

I'm a bit clueless about any further options or whether i'm dealing with a
Jmeter bug...

I'm truly looking forward to your answers :)

Cheers

Re: Jmeter 2.3.4 - XPath Extractor - Error getting DTD

Posted by Gromadusi <gr...@gmail.com>.
Thank you, will try that!



On Fri, Sep 4, 2009 at 6:22 PM, sebb <se...@gmail.com> wrote:

> On 04/09/2009, Gromadusi <gr...@gmail.com>>
> wrote:
> > Hi,
> >
> >  I'm trying to run a simple XPath extraction (something like
> //li/a[@href]
> >  through a html document by the help of the 'XPath Extractor' Post
> Processor.
> >
> >  It does not work, and all i get from the jmeter.log is
> >
> >  2009/09/04 13:25:18 ERROR - jmeter.threads.JMeterThread: Test failed!
> >  org.apache.jorphan.util.JMeterError: error on (//li/a[@href])
> >     at
> >
>  org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:110)
> >     at
> >
>  org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:590)
> >     at
> >
>  org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:347)
> >     at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:239)
> >     at java.lang.Thread.run(Unknown Source)
> >  Caused by: java.io.IOException: Server returned HTTP response code: 503
> for
> >  URL: http://www.w3.org/TR/html4/strict.dtd
> >     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
> >  Source)
> >     at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
> >  Source)
> >     at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
> >     at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
> >  Source)
> >     at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
> >  Source)
> >     at
> >
>  org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
> >  Source)
> >     at
> >
>  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> >  Source)
> >     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> >     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> >     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> >     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> >     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> >     at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
> >     at org.apache.jmeter.util.XPathUtil.makeDocument(XPathUtil.java:167)
> >     at
> >
>  org.apache.jmeter.extractor.XPathExtractor.parseResponse(XPathExtractor.java:221)
> >     at
> >
>  org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:105)
> >
> >  How I interpret the line 'Caused by: java.io.IOException: Server
> returned
> >  HTTP response code: 503 for URL: http://www.w3.org/TR/html4/strict.dtd'
> is
> >  that Jmeter tries to validate my XPath expression based on this dtd, but
> >  Jmeter (or the user agent it pretents to be) is not allowed to fetch
> that
> >  document.
> >  I already tried to set the user agent (by using the HTTP Header Manager)
> to
> >  my current FF installation which definately IS able to download that
> dtd,
> >  but no success.
> >
> >  I'd be interested in turning off that validation completely, OR pointing
> to
> >  a local copy of it...and again, haven't found any info whatsoever
> >
> >  I'm a bit clueless about any further options or whether i'm dealing with
> a
> >  Jmeter bug...
> >
> >  I'm truly looking forward to your answers :)
> >
> >  Cheers
> >
>
> This has been raised as a bug:
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=47338
>
> It's fixed in the current source, but has yet to be released.
>
> It will be in nightly builds after 789187, if you want to try one of
> those - but beware that such builds have not been thoroughly tested
> and may misbehave badly.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Jmeter 2.3.4 - XPath Extractor - Error getting DTD

Posted by sebb <se...@gmail.com>.
On 04/09/2009, Gromadusi <gr...@gmail.com> wrote:
> Hi,
>
>  I'm trying to run a simple XPath extraction (something like //li/a[@href]
>  through a html document by the help of the 'XPath Extractor' Post Processor.
>
>  It does not work, and all i get from the jmeter.log is
>
>  2009/09/04 13:25:18 ERROR - jmeter.threads.JMeterThread: Test failed!
>  org.apache.jorphan.util.JMeterError: error on (//li/a[@href])
>     at
>  org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:110)
>     at
>  org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:590)
>     at
>  org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:347)
>     at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:239)
>     at java.lang.Thread.run(Unknown Source)
>  Caused by: java.io.IOException: Server returned HTTP response code: 503 for
>  URL: http://www.w3.org/TR/html4/strict.dtd
>     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
>  Source)
>     at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
>  Source)
>     at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
>     at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
>  Source)
>     at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
>  Source)
>     at
>  org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
>  Source)
>     at
>  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>  Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>     at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
>     at org.apache.jmeter.util.XPathUtil.makeDocument(XPathUtil.java:167)
>     at
>  org.apache.jmeter.extractor.XPathExtractor.parseResponse(XPathExtractor.java:221)
>     at
>  org.apache.jmeter.extractor.XPathExtractor.process(XPathExtractor.java:105)
>
>  How I interpret the line 'Caused by: java.io.IOException: Server returned
>  HTTP response code: 503 for URL: http://www.w3.org/TR/html4/strict.dtd' is
>  that Jmeter tries to validate my XPath expression based on this dtd, but
>  Jmeter (or the user agent it pretents to be) is not allowed to fetch that
>  document.
>  I already tried to set the user agent (by using the HTTP Header Manager) to
>  my current FF installation which definately IS able to download that dtd,
>  but no success.
>
>  I'd be interested in turning off that validation completely, OR pointing to
>  a local copy of it...and again, haven't found any info whatsoever
>
>  I'm a bit clueless about any further options or whether i'm dealing with a
>  Jmeter bug...
>
>  I'm truly looking forward to your answers :)
>
>  Cheers
>

This has been raised as a bug:

https://issues.apache.org/bugzilla/show_bug.cgi?id=47338

It's fixed in the current source, but has yet to be released.

It will be in nightly builds after 789187, if you want to try one of
those - but beware that such builds have not been thoroughly tested
and may misbehave badly.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org