[JIRA] (JENKINS-61471) A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found

18 views
Skip to first unread message

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 9:36:04 AM3/13/20
to jenkinsc...@googlegroups.com
Ana Scotti created an issue
 
Jenkins / Bug JENKINS-61471
A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found
Issue Type: Bug Bug
Assignee: Joe Hansche
Components: confluence-publisher-plugin
Created: 2020-03-13 13:35
Environment: confluent-publisher 2.0.5
jenkins ver. 2.204.5
confluence 6.15.8
Priority: Major Major
Reporter: Ana Scotti

Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. The request never reaches confluence.

archiveArtifacts artifacts: file.txt
publishConfluence siteName: 'myconfluece.com', pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 9:42:04 AM3/13/20
to jenkinsc...@googlegroups.com
Paulo Ferreira updated an issue
Change By: Paulo Ferreira
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. The request never reaches confluence. agent
{code:java}
agent {
archiveArtifacts artifacts: file.txt
publishConfluence siteName: 'myconfluece.com', pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
} {code}
 
{code:java}

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 9:52:05 AM3/13/20
to jenkinsc...@googlegroups.com

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 10:16:03 AM3/13/20
to jenkinsc...@googlegroups.com
Paulo Ferreira updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. The request never reaches confluence.agent  
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true

}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 10:28:03 AM3/13/20
to jenkinsc...@googlegroups.com

scottianapaula@gmail.com (JIRA)

unread,
Mar 13, 2020, 12:11:04 PM3/13/20
to jenkinsc...@googlegroups.com
Paulo Ferreira updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}


A curl GET to myconfluence.com/rest/api/space/SpaceABC with the same basic authentication user gives med a valid json response for the space.

anah.sour@gmail.com (JIRA)

unread,
Mar 16, 2020, 3:02:58 AM3/16/20
to jenkinsc...@googlegroups.com
sgao thaich updated an issue
Change By: sgao thaich
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

A curl GET to myconfluence.com/rest/api/space/SpaceABC with the same basic authentication user gives med a valid json response for the space.

What is the request the plugin is performing for uploading attachments? Does it need any special priviledge in confluence?

anah.sour@gmail.com (JIRA)

unread,
Mar 16, 2020, 3:04:47 AM3/16/20
to jenkinsc...@googlegroups.com
sgao thaich updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

A It seems to fail when fetching the space, but a curl GET to myconfluence.com/rest/api/space/SpaceABC with the same basic authentication user gives med a valid json response for the space .

What is the request the plugin is performing for uploading attachments? Does it need any special priviledge in confluence?

anah.sour@gmail.com (JIRA)

unread,
Mar 16, 2020, 3:05:34 AM3/16/20
to jenkinsc...@googlegroups.com
sgao thaich updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

It seems to fail when fetching the space, but a curl GET to myconfluence.com/rest/api/space/SpaceABC with the same basic authentication user gives med a valid json response.
What is the request the plugin is performing for uploading attachments? Does it need any special priviledge in confluence?

anah.sour@gmail.com (JIRA)

unread,
Mar 16, 2020, 3:29:03 AM3/16/20
to jenkinsc...@googlegroups.com
sgao thaich updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: 'SpaceABC', attachArchivedArtifacts: true
}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}

It seems to fail when fetching the space, but the response status is < 300 so we try to get a Space entity but content is html which is probably an error.
A
curl GET to myconfluence.com/rest/api/space/SpaceABC with the same basic authentication user gives med a valid json response.

anah.sour@gmail.com (JIRA)

unread,
Mar 17, 2020, 3:31:03 AM3/17/20
to jenkinsc...@googlegroups.com

anah.sour@gmail.com (JIRA)

unread,
Mar 17, 2020, 3:31:04 AM3/17/20
to jenkinsc...@googlegroups.com
sgao thaich updated an issue
Publishing fails after upgrading from 2.0.3 to 2.0.5 with com.sun.jersey.api.client.ClientHandlerException. 
{code:java}
agent {
    archiveArtifacts artifacts: file.txt
    publishConfluence pageName: 'My page', spaceName: ' SpaceABC SpaceA ', attachArchivedArtifacts: true

}{code}
 
{code:java}
com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Space, and Java type class com.atlassian.confluence.api.model.content.Space, and MIME media type text/html; charset=UTF-8 was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:630) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686) at com.sun.jersey.api.client.WebResource.get(WebResource.java:193) at com.atlassian.confluence.rest.client.AbstractRemoteService.getOption(AbstractRemoteService.java:181) at com.atlassian.confluence.rest.client.AbstractRemoteService.lambda$getFutureOption$1(AbstractRemoteService.java:77) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
{code}


It seems to fail when fetching the space, the response status is < 300 so we try the plugin tries to get a deserialize the response body into Space entity but content is html which is probably an error.
A {code:java}
remoteSpaceService.find()
        .withKeys(spaceKey).fetchOne().claim()
{code}


When i try the following
curl i get a valid json response, using the same basic auth user used by the plugin:
{code:java}
curl -i -X
GET to -H "Authorization: Basic *********" https:// myconfluence.com/rest/api/space /SpaceABC with the same basic authentication user gives med a valid json response. ?spaceKey=SpaceA
{code}
Reply all
Reply to author
Forward
0 new messages