3
我可以使用Jersey客戶端連接到使用IPv6的REST資源嗎?Jersey客戶端IPv6
我得到這個錯誤:
com.sun.jersey.api.client.ClientHandlerException: java.net.MalformedURLException: For input string: ":94ea:d2bc:c189:209c%10:8100"
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:128)
at com.sun.jersey.api.client.Client.handle(Client.java:551)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:556)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:69)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:475)
at com.bmc.aps.agent.jersey.JerseyClient.put(JerseyClient.java:168)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.MalformedURLException: For input string: ":94ea:d2bc:c189:209c%10:8100"
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1081)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:139)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:126)
... 8 more
在異常的IP被切斷(:94ea:d2bc:c189:209c%10
而不是fe80::94ea:d2bc:c189:209c%10
)。 在調試中,我可以看到web資源URI是確定的。