redmine java api 创建issues
Added by aiqing chen over 10 years ago
RedmineManager mgr = new RedmineManager("http://localhost/redmine/", "98555a0d30ce752b8dcf944031373f74bd11dd1a");
try {
tryMakeIssue(mgr);
} catch (Exception e) {
e.printStackTrace();
}
private static void tryMakeIssue(RedmineManager mgr) throws Exception {
Date date = new Date();
Issue issue = new Issue();
Tracker tracker = new Tracker();
tracker.setId(4);
tracker.setName("缺陷");
issue.setId(8);
issue.setSubject("缺陷ID:TC0001 功能缺陷障碍");
issue.setTracker(tracker);
issue.setStartDate(date);
issue.setStatusId(1);
issue.setPriorityId(2);
mgr.createIssue("taskconnector-test", issue);
System.out.println(issue.toString());
}
报错信息:
com.taskadapter.redmineapi.NotFoundException: Server returned '404 not found'. response body:
at com.taskadapter.redmineapi.internal.comm.redmine.RedmineErrorHandler.processContent(RedmineErrorHandler.java:45)
at com.taskadapter.redmineapi.internal.comm.redmine.RedmineErrorHandler.processContent(RedmineErrorHandler.java:1)
at com.taskadapter.redmineapi.internal.comm.ComposingHandler.processContent(ComposingHandler.java:25)
at com.taskadapter.redmineapi.internal.comm.ComposingHandler.processContent(ComposingHandler.java:25)
at com.taskadapter.redmineapi.internal.comm.BaseCommunicator.sendRequest(BaseCommunicator.java:83)
at com.taskadapter.redmineapi.internal.comm.redmine.RedmineAuthenticator.sendRequest(RedmineAuthenticator.java:52)
at com.taskadapter.redmineapi.internal.comm.FmapCommunicator.sendRequest(FmapCommunicator.java:26)
at com.taskadapter.redmineapi.internal.comm.FmapCommunicator.sendRequest(FmapCommunicator.java:26)
at com.taskadapter.redmineapi.internal.comm.BasicSimplifier.sendRequest(BasicSimplifier.java:24)
at com.taskadapter.redmineapi.internal.Transport.addObject(Transport.java:205)
at com.taskadapter.redmineapi.RedmineManager.createIssue(RedmineManager.java:160)
at Simple.tryMakeIssue(Simple.java:53)
at Simple.main(Simple.java:22)
Replies (2)
RE: redmine java api 创建issues - Added by Jan Niggemann (redmine.org team member) over 10 years ago
The "Redmine Java API" is a third-party Java library. Its website mentions compatibility with redmine up to 2.3.3.
You did not properly report your error as set forth in How to request help, perhaps your version of redmine is not supported by that library?
RE: redmine java api 创建issues - Added by aiqing chen over 10 years ago
My question is to create Issues with redmine-java-api, reported 404 errors, how to solve the problem.