我复制了Java Toolkit for Rally Rest页面底部的“说明如何查询前 5 个最高优先级缺陷”的代码示例。
我相应地更改了用户名和密码,但我得到了一个UnknownHostException
.
这是堆栈跟踪:
log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.BasicClientConnectionManager).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.net.UnknownHostException: rally1.rallydev.com
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
at java.net.InetAddress.getAllByName(InetAddress.java:1083)
at java.net.InetAddress.getAllByName(InetAddress.java:1019)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at com.rallydev.rest.RallyRestApi.doRequest(RallyRestApi.java:253)
at com.rallydev.rest.RallyRestApi.doGet(RallyRestApi.java:323)
at com.rallydev.rest.RallyRestApi.query(RallyRestApi.java:179)
at com.jdes.AgileToRally.AgileToRally.main(AgileToRally.java:37)
第 37 行:QueryResponse queryResponse = restApi.query(defects);
我试过更改服务器名称、用户名和密码,但没有运气。
谢谢