Bug 62997 - java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " "
Summary: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in esc...
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 4.0
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-10 13:36 UTC by Ram Yelisetty
Modified: 2019-02-15 11:21 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ram Yelisetty 2018-12-10 13:36:56 UTC
I am getting this error while recording a web application and displaying "501 Method not implemented"

java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " "
	at java.net.URLDecoder.decode(Unknown Source)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:144)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:182)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addEncodedArgument(HTTPSamplerBase.java:609)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.parseArguments(HTTPSamplerBase.java:1137)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.setPath(HTTPSamplerBase.java:462)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.computePath(DefaultSamplerCreator.java:319)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.computeFromHeader(DefaultSamplerCreator.java:141)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.populateSampler(DefaultSamplerCreator.java:107)
	at org.apache.jmeter.protocol.http.proxy.AbstractSamplerCreator.createAndPopulateSampler(AbstractSamplerCreator.java:155)
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:222)java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " "
	at java.net.URLDecoder.decode(Unknown Source)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:144)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:182)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.addEncodedArgument(HTTPSamplerBase.java:609)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.parseArguments(HTTPSamplerBase.java:1137)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.setPath(HTTPSamplerBase.java:462)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.computePath(DefaultSamplerCreator.java:319)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.computeFromHeader(DefaultSamplerCreator.java:141)
	at org.apache.jmeter.protocol.http.proxy.DefaultSamplerCreator.populateSampler(DefaultSamplerCreator.java:107)
	at org.apache.jmeter.protocol.http.proxy.AbstractSamplerCreator.createAndPopulateSampler(AbstractSamplerCreator.java:155)
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:222)
Comment 1 Philippe Mouawad 2018-12-10 13:45:11 UTC
Hello,
Thanks for report.
Can you provide the request content that is failing:
- Full URL
- Post body if any
- Headers
- Cookies

and jmeter.log.

Thank you
Comment 2 Sanjay 2019-02-15 11:21:28 UTC
Hi Ram Yelisetty,

It looks like your request content string contains escape character like '%' and your request content string might be something like this "abc%  @de".

However, java.net.URLDecoder.decode("String") throws exception for such escape 
characters. So Please make sure your request content string does not contain escape charecter(%).