It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

A message body reader not found for api.model.content.Space and MIME media type text/html Edited

GET space fails with during response deserialization. It seems response code is < 300 and jersey tries to get entity as com.atlassian.confluence.api.model.content.Space but Content-type is text/xml.

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(
	at com.sun.jersey.api.client.ClientResponse.getEntity(
	at com.sun.jersey.api.client.WebResource.handle(
	at com.sun.jersey.api.client.WebResource.get(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

Client call:


This code is from confluence-publisher jenkins plugin, and I'm trying to figure where the problem really lies, and in what cases the api could respond with http code 2xx but text/html content? 

When i try the following curl i get a valid json response, using the same basic auth user used by the plugin:

curl -i -X GET -H "Authorization: Basic *********"

HTTP/2 200



0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,367 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you