java.net.URISyntaxException:索引为72的查询中的非法字符 [英] java.net.URISyntaxException: Illegal character in query at index 72

查看:954
本文介绍了java.net.URISyntaxException:索引为72的查询中的非法字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请求网址已字符串化为json

The request URL has stringified json

Sampler Result:
Thread Name: Thread Group 1-1
Sample Start: 2013-09-05 12:09:17 IST
Load time: 0
Latency: 0
Size in bytes: 4491
Headers size in bytes: 0
Body size in bytes: 4491
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Illegal character in query at index 72:

Request:
GET  http://abc.com/api/api_name?XYZModelJsonString={[{},{},{},{},{},{},{},{},{},{},{},{}]{}}
[no cookies]

Response data:
java.net.URISyntaxException: Illegal character in query at index 72: http://abc.com/api/api_name?XYZModelJsonString={[{},{},{},{},{},{},{},{},{},{},{},{}]{}}

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.<init>(Unknown Source)
    at java.net.URL.toURI(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:234)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Unknown Source)

推荐答案

移动以下内容:

XYZModelJsonString = {[{},{},{},{},{},{},{},{},{},{},{},{}] {}}

XYZModelJsonString ={[{},{},{},{},{},{},{},{},{},{},{},{}]{}}

在参数表中,将XYZModelJsonString放在名称列中,将其余的放在值列中,并在该列中选中编码"复选框.

In the parameters table putting XYZModelJsonString in name column and the rest in value column and check encode checkbox in the column.

会起作用的

这篇关于java.net.URISyntaxException:索引为72的查询中的非法字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆