我正在使用 jira-rest-java-client-core 和 jira-rest-java-client-api (2.0.0-m31) 和 maven。GET an issue 工作正常,但是当我尝试创建一个问题时我遇到了问题。
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
JiraRestClient jiraRestClient = factory.createWithBasicHttpAuthentication(URI.create("https://jira_host"), username, password);
IssueRestClient client = jiraRestClient.getIssueClient();
IssueInputBuilder issueBuilder = new IssueInputBuilder("TEST", 1L, "Summary Test");
IssueInput issueInput = issueBuilder.build();
BasicIssue issue = client.createIssue(issueInput).claim();
和错误:
org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor exception
GRAVE: http-outgoing-1 [ACTIVE(5)] HTTP protocol exception: Input length = 1
java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:277)
at org.apache.http.impl.nio.reactor.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:193)
at org.apache.http.impl.nio.codecs.AbstractMessageParser.parse(AbstractMessageParser.java:171)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:171)
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onInputReady(DefaultHttpClientIODispatch.java:125)
at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onInputReady(DefaultHttpClientIODispatch.java:50)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:745)
你有解决这个问题的想法吗?
Tks,亚历山大