Bug 57078

Summary: LagartoBasedHTMLParser fails to parse page that contains input with no type
Product: JMeter Reporter: Graham Russell <graham>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: The HTML from google.

Description Graham Russell 2014-10-12 19:30:56 UTC
Created attachment 32102 [details]
The HTML from google.

I have just built from source using the github trunk at 12 Oct 2014 (approx 2000 GMT). I have a very simple test which uses a cache manager and does one get to www.google.co.uk with the retrieve embedded resources enabled. Upon running the test I get the following:

org.apache.jmeter.protocol.http.parser.HTMLParseException: java.lang.NullPointerException
	at org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser.getEmbeddedResourceURLs(LagartoBasedHtmlParser.java:226)
	at org.apache.jmeter.protocol.http.parser.HTMLParser.getEmbeddedResourceURLs(HTMLParser.java:150)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.downloadPageResources(HTTPSamplerBase.java:1190)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1573)
	at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:344)
	at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:405)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1134)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1123)
	at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:431)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:258)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at jodd.lagarto.TagUtil.equalsIgnoreCase(TagUtil.java:148)
	at org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser$JMeterTagVisitor.tag(LagartoBasedHtmlParser.java:136)
	at jodd.lagarto.LagartoParser.emitTag(LagartoParser.java:2834)
	at jodd.lagarto.LagartoParser$12.parse(LagartoParser.java:784)
	at jodd.lagarto.LagartoParser.parse(LagartoParser.java:114)
	at org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser.getEmbeddedResourceURLs(LagartoBasedHtmlParser.java:217)
	... 11 more

I have tried the exact same thing on 2.11 and it seems to work fine. I have also tried to do the same thing on a more simple page (ham1.co.uk) and it works fine - i.e. parses and downloads the embedded files.
Comment 1 Philippe Mouawad 2014-10-12 20:14:19 UTC
Date: Sun Oct 12 20:13:29 2014
New Revision: 1631251

URL: http://svn.apache.org/r1631251
Log:
Bug 57078 - LagartoBasedHTMLParser fails to parse page that contains input with no type
Bugzilla Id: 57078

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/parser/LagartoBasedHtmlParser.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2014-10-12 20:14:44 UTC
Thanks for report. Your feedback on nightly build is welcome.