我正在尝试使用过滤条件查询ALM缺陷,但出现以下异常。通过浏览器访问时,相同的URL可以正常工作。
java.io.IOException: Server returned HTTP response code: 500 for URL:
http://ealm11.mycomp.com:80/qcbin/rest/domains/TESTING/projects/2014/defects?query={owner['das' or 'john' or 'kim'];status[Assigned]}&fields=id at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491)
at java.security.AccessController.doPrivileged(Native Method) at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
另外,如果URL在以下一个参数值中不具有“或”条件,则如下所示
http://ealm11.mycomp.com:80/qcbin/rest/domains/TESTING/projects/2014/defects?query={owner['das'];status[Assigned]}&fields=id
它正在工作,但是当我引入“或”条件时,java抛出了以上错误。
您是否尝试过使用“%20”作为URL中的空格?
http://ealm11.mycomp.com:80/qcbin/rest/domains/TESTING/projects/2014/defects?query={owner['das'%20or%20'john'%20or%20'kim'];status[Assigned]}&fields=id
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句