91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

java模擬http請求的錯誤問題整理

發布時間:2020-08-19 21:45:29 來源:腳本之家 閱讀:293 作者:總有叼民想害朕 欄目:編程語言

在java模擬http請求的時候,報錯,代碼,錯誤詳情如下:

Configuration.xml

<?xml version="1.0" encoding="UTF-8"?>
<system>
  <!--請求url-->
  <category name="url" description="指標 URL相關配置">
    <item name="volumenormUrl" value="10.150.33.154:8080/getInfo/getUser" description="臨時的URL地址"></item>
  </category>
</system>

Java code

 String url = Configuration.getString("url.volumenormUrl");
    try {
      log.info("=============={}",url);
      String responseString = HttpUtil.doGet(url);
      log.info("crmLoginUrl responseString {} {}", url, responseString);
      return JsonResponse.success();
    } catch (WXException e) {
      log.error("crmLogin fail... {}, e = {} ", e.getMessage(), e);
      e.printStackTrace();
      return JsonResponse.failure("fail");
    }

錯誤代碼:

java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: 10.150.33.154:8080/getInfo/getUser
	at java.net.URI.create(URI.java:852)
	at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:69)
	at com.foundersc.ifc.service.base.http.HttpUtil.doGet(HttpUtil.java:30)
	at com.foundersc.ifc.volumenorm.controller.Test.getNorm(Test.java:29)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:781)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:721)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.net.URISyntaxException: Illegal character in scheme name at index 0: 10.150.33.154:8080/getInfo/getUser
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.checkChar(URI.java:3031)
	at java.net.URI$Parser.parse(URI.java:3047)
	at java.net.URI.<init>(URI.java:588)
	at java.net.URI.create(URI.java:850)
	... 41 more
Disconnected from the target VM, address: '127.0.0.1:65013', transport: 'socket'

Process finished with exit code -1

百度了一下,發現好多沒用的文章,后來上bing一搜,一下找到了根源,在configuration.xml里面的value前面一定要家http://,否則就會報錯~大家放棄百度把,太坑了。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

都安| 陕西省| 天柱县| 宜宾市| 太白县| 信丰县| 密山市| 资阳市| 宿州市| 三亚市| 保亭| 来安县| 米林县| 大邑县| 鄂温| 阜南县| 屯昌县| 唐山市| 神农架林区| 行唐县| 湾仔区| 化隆| 武平县| 共和县| SHOW| 灵寿县| 兴仁县| 三台县| 章丘市| 偏关县| 巧家县| 常德市| 博野县| 理塘县| 卢龙县| 永安市| 清水河县| 龙川县| 宁陕县| 沁水县| 宾阳县|