JIRA-REST-JAVA - 创建问题时出错MalformedInputException

时间:2014-12-10 10:03:42

标签: jira-rest-java-api

我正在使用jira-rest-java-client-core和jira-rest-java-client-api(2.0.0-m31)和maven。 GET一个问题可以解决,但是当我尝试创建一个问题时我遇到了问题。

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)

你有想法解决这个问题吗?

韩国社交协会, 亚历山大

0 个答案:

没有答案