Rams
Rams

Reputation: 193

Issue occuring during the proxy recording of jmeter

I am a newbie to jmeter, i just started recording the scripts, when i try to record it through proxy server which is available in jmeter, I would see a message on the view of site saying -

java.net.URISyntaxException: Illegal character in query at index 121: https://xxx.xxx.com/xyz/RELEASE99/" at java.net.URI$Parser.fail(Unknown Source) at java.net.URI$Parser.checkChars(Unknown Source) at java.net.URI$Parser.parseHierarchical(Unknown Source) at java.net.URI$Parser.parse(Unknown Source) at java.net.URI.(Unknown Source) at java.net.URL.toURI(Unknown Source) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Imp l.sample(HTTPHC4Impl.java:234) at org.apache.jmeter.protocol.http.sampler.HTTPSample rProxy.sample(HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSample rBase.sample(HTTPSamplerBase.java:1088) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:211)

It would be thankful if some one could help me out with a possible solutions on it.

Thanks, Revanth

Upvotes: 0

Views: 1728

Answers (3)

user2862211
user2862211

Reputation:

It looks like that you have a non-ASCII character at position 121. Could you please check the following:

  1. Search for something like jmeter.JMeter: file.encoding= in jmeter.log file. It usually lives under /bin folder of your JMeter installation. It should be "UTF-8". If it's not the case - relaunch JMeter with -Dfile.encoding=UTF-8 option as

    jmeter.bat -Dfile.encoding=UTF-8
    
  2. Check your HTTP Request Defaults config element. If it's not there - add it and set Content encoding stanza to be "UTF-8" (without quotes)

  3. Check problematic HTTP request "Send Parameters with the request" section. If you're passing parameters directly in URL it's better to transfer them to "Send Parameters With the Request". If there is any non-ASCII stuff make sure that the relevant "Encode?" box is checked.

Upvotes: 1

Rams
Rams

Reputation: 193

There were multiple checkpoints which i have actually run through, prime of them were 1. Choosing the right HTTP protocol from HTTP(S) script recorder 2. as @dmitri and @ray said, both the options were true 3. In addition to above scenarios, i have got a valid signed certificate for the test environment i was trying to and was able to proceed further

Upvotes: 0

Ray
Ray

Reputation: 156

It seems there is something wrong in your URL? I assume you made the xxx.xxx? As the mentioned index (121) suggests a much longer URL string.

You might start with a 'trusted' URL, like a search engine, so you can check that your jmeter proxy works ok, to be sure.

Upvotes: 0

Related Questions