拉力赛:java应用程序最近开始抛出异常
大约两周后,我开始使用java应用程序,现在每次运行时都会看到以下异常:拉力赛:java应用程序最近开始抛出异常,java,rally,Java,Rally,大约两周后,我开始使用java应用程序,现在每次运行时都会看到以下异常: Exception in thread "main" java.io.IOException: HTTP/1.1 500 Internal Server Error at com.rallydev.rest.RallyRestApi.doRequest(RallyRestApi.java:258) at com.rallydev.rest.RallyRestApi.doPost(RallyRestApi.j
Exception in thread "main" java.io.IOException: HTTP/1.1 500 Internal Server Error
at com.rallydev.rest.RallyRestApi.doRequest(RallyRestApi.java:258)
at com.rallydev.rest.RallyRestApi.doPost(RallyRestApi.java:276)
at com.rallydev.rest.RallyRestApi.update(RallyRestApi.java:155)
at ExportTRtoRally.testresult_to_testset(ExportTRtoRally.java:273)
at ExportTRtoRally.main(ExportTRtoRally.java:453)
当testresults被添加到testset时,就会发生这种情况,如上图所示。
该应用程序在过去一直运行良好。
有人知道原因吗
以下是testresult\u to\u testset()方法:
public static void testresult_to_testset(RallyRestApi r、ArrayList testres_refs、String testset_ref)引发IOException{
System.out.println(“\n--------------------\n将测试结果添加到测试集…”);
用于(字符串i2:testres\u refs){
JsonObject tingo2=新的JsonObject();
tingo2.addProperty(“TestSet”,TestSet\u ref);
UpdateRequest req=新的UpdateRequest(i2,tingo2);
UpdateResponse resp=r.update(请求);
if(resp.wassuctive())
System.out.println(resp.getObject().get(“\u ref”).getAsString());
}
System.out.println(“--------------------------------------\nTestResults已成功添加到TestSet\n------------------------------”;
}
谢谢,
Haris如果您想要答案,您必须显示更多代码。具体地说,<>代码> TestReultTythtoTestStuts
public static void testresult_to_testset(RallyRestApi r, ArrayList<String> testres_refs, String testset_ref) throws IOException{
System.out.println("\n--------------------------------\nAdding test results to the testset...");
for (String i2 : testres_refs){
JsonObject tingo2 = new JsonObject();
tingo2.addProperty("TestSet", testset_ref);
UpdateRequest req = new UpdateRequest(i2, tingo2);
UpdateResponse resp = r.update(req);
if(resp.wasSuccessful())
System.out.println(resp.getObject().get("_ref").getAsString());
}
System.out.println("----------------------------------\nTestResults successfully added to TestSet\n----------------------------------");
}