com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found

Atlassian JIRA | Steve Lancashire [Atlassian] | 3 years ago
  1. 0

    This build failed : https://confluence-bamboo.internal.atlassian.com/browse/CONFFUNC-MAINM3-BATCH06-330/test/case/609899714 with this error on the client side {code} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:674) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563) at com.atlassian.confluence.rest.client.AbstractRemoteService.post(AbstractRemoteService.java:343) at com.atlassian.confluence.rest.client.AbstractRemoteService.access$300(AbstractRemoteService.java:39) at com.atlassian.confluence.rest.client.AbstractRemoteService$5.call(AbstractRemoteService.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:55) at com.atlassian.confluence.rest.client.PromisingExecutorService.submit(PromisingExecutorService.java:65) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:145) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:140) at com.atlassian.confluence.rest.client.RemoteContentServiceImpl.create(RemoteContentServiceImpl.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.rest.client.proxy.RemoteServiceProxyCreator$1.invoke(RemoteServiceProxyCreator.java:59) at com.sun.proxy.$Proxy15.create(Unknown Source) at com.atlassian.confluence.it.rpc.delegates.ContentRpc.createPage(ContentRpc.java:83) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:624) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:605) at com.atlassian.confluence.MacroDiffAcceptanceTest.setUp(MacroDiffAcceptanceTest.java:43) {code} and the following stack on the server: {code} 2014-03-05 03:22:11,794 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromCookie getUserFromCookie : Got username : 'null' from cookie, attempting to authenticate user is known 2014-03-05 03:22:11,795 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : Looking in Basic Auth headers 2014-03-05 03:22:11,797 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : 'admin' does not require elevated security check. Attempting authentication... 2014-03-05 03:22:11,806 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] login login : 'admin' has been authenticated 2014-03-05 03:22:11,807 ERROR [http-bio-47362-exec-5] [confluence.web.filter.DebugFilter] getSession HttpServletRequest#getSession has been invoked after the response has been committed for URI /confluence/rest/api/content 2014-03-05 03:22:11,811 ERROR [http-bio-47362-exec-5] [[Catalina].[localhost].[/confluence].[noop]] log Servlet.service() for servlet [noop] in context with path [/confluence] threw exception java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2921) at org.apache.catalina.connector.Request.getSession(Request.java:2318) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:899) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at com.atlassian.confluence.web.filter.DebugFilter$DebugHttpServletRequestWrapper.getSession(DebugFilter.java:105) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:140) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238) at com.atlassian.confluence.security.seraph.ConfluenceAuthenticatorUtils.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticatorUtils.java:29) at com.atlassian.confluence.user.ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticator.java:92) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:192) at com.atlassian.confluence.user.ConfluenceAuthenticator.authoriseUserAndEstablishSession(ConfluenceAuthenticator.java:147) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.confluence.user.ConfluenceAuthenticator.login(ConfluenceAuthenticator.java:53) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromBasicAuthentication(DefaultAuthenticator.java:525) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:336) at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135) {code}

    Atlassian JIRA | 3 years ago | Steve Lancashire [Atlassian]
    com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found
  2. 0

    This build failed : https://confluence-bamboo.internal.atlassian.com/browse/CONFFUNC-MAINM3-BATCH06-330/test/case/609899714 with this error on the client side {code} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:674) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563) at com.atlassian.confluence.rest.client.AbstractRemoteService.post(AbstractRemoteService.java:343) at com.atlassian.confluence.rest.client.AbstractRemoteService.access$300(AbstractRemoteService.java:39) at com.atlassian.confluence.rest.client.AbstractRemoteService$5.call(AbstractRemoteService.java:150) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:55) at com.atlassian.confluence.rest.client.PromisingExecutorService.submit(PromisingExecutorService.java:65) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:145) at com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:140) at com.atlassian.confluence.rest.client.RemoteContentServiceImpl.create(RemoteContentServiceImpl.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.confluence.rest.client.proxy.RemoteServiceProxyCreator$1.invoke(RemoteServiceProxyCreator.java:59) at com.sun.proxy.$Proxy15.create(Unknown Source) at com.atlassian.confluence.it.rpc.delegates.ContentRpc.createPage(ContentRpc.java:83) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:624) at com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:605) at com.atlassian.confluence.MacroDiffAcceptanceTest.setUp(MacroDiffAcceptanceTest.java:43) {code} and the following stack on the server: {code} 2014-03-05 03:22:11,794 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromCookie getUserFromCookie : Got username : 'null' from cookie, attempting to authenticate user is known 2014-03-05 03:22:11,795 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : Looking in Basic Auth headers 2014-03-05 03:22:11,797 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] getUserFromBasicAuthentication getUserFromSession : 'admin' does not require elevated security check. Attempting authentication... 2014-03-05 03:22:11,806 DEBUG [http-bio-47362-exec-5] [atlassian.seraph.auth.DefaultAuthenticator] login login : 'admin' has been authenticated 2014-03-05 03:22:11,807 ERROR [http-bio-47362-exec-5] [confluence.web.filter.DebugFilter] getSession HttpServletRequest#getSession has been invoked after the response has been committed for URI /confluence/rest/api/content 2014-03-05 03:22:11,811 ERROR [http-bio-47362-exec-5] [[Catalina].[localhost].[/confluence].[noop]] log Servlet.service() for servlet [noop] in context with path [/confluence] threw exception java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2921) at org.apache.catalina.connector.Request.getSession(Request.java:2318) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:899) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at com.atlassian.confluence.web.filter.DebugFilter$DebugHttpServletRequestWrapper.getSession(DebugFilter.java:105) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:146) at com.atlassian.plugin.servlet.PluginHttpRequestWrapper.getSession(PluginHttpRequestWrapper.java:140) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:238) at com.atlassian.confluence.security.seraph.ConfluenceAuthenticatorUtils.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticatorUtils.java:29) at com.atlassian.confluence.user.ConfluenceAuthenticator.isPrincipalAlreadyInSessionContext(ConfluenceAuthenticator.java:92) at com.atlassian.seraph.auth.DefaultAuthenticator.authoriseUserAndEstablishSession(DefaultAuthenticator.java:192) at com.atlassian.confluence.user.ConfluenceAuthenticator.authoriseUserAndEstablishSession(ConfluenceAuthenticator.java:147) at com.atlassian.seraph.auth.DefaultAuthenticator.login(DefaultAuthenticator.java:102) at com.atlassian.confluence.user.ConfluenceAuthenticator.login(ConfluenceAuthenticator.java:53) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromBasicAuthentication(DefaultAuthenticator.java:525) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:336) at com.atlassian.confluence.user.ConfluenceAuthenticator.getUser(ConfluenceAuthenticator.java:135) {code}

    Atlassian JIRA | 3 years ago | Steve Lancashire [Atlassian]
    com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found
  3. 0

    Problem using the Activiti Rest web services

    Stack Overflow | 5 years ago | Elio
    com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.sun.jersey.core.util.MultivaluedMapImpl, and MIME media type, application/json, was not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java: POST large string with REST/Jersey

    Stack Overflow | 2 years ago | AnswerNotKnownException
    com.sun.jersey.api.client.ClientHandlerException: java.io.IOException: Error writing to server
  6. 0

    Send a HashMap using Jersey for REST web service

    Stack Overflow | 5 years ago | Marouane
    com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class java.util.HashMap, and MIME media type, application/xml, was not found

  1. asdasd 16 times, last 3 months ago
  2. tvrmsmith 5 times, last 5 months ago
15 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.sun.jersey.api.client.ClientHandlerException

    A message body reader for Java class com.atlassian.confluence.api.model.content.Content, and Java type class com.atlassian.confluence.api.model.content.Content, and MIME media type application/octet-stream was not found

    at com.sun.jersey.api.client.ClientResponse.getEntity()
  2. jersey-client
    WebResource$Builder.post
    1. com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:549)
    2. com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506)
    3. com.sun.jersey.api.client.WebResource.handle(WebResource.java:674)
    4. com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    5. com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:563)
    5 frames
  3. com.atlassian.confluence
    AbstractRemoteService$5.call
    1. com.atlassian.confluence.rest.client.AbstractRemoteService.post(AbstractRemoteService.java:343)
    2. com.atlassian.confluence.rest.client.AbstractRemoteService.access$300(AbstractRemoteService.java:39)
    3. com.atlassian.confluence.rest.client.AbstractRemoteService$5.call(AbstractRemoteService.java:150)
    3 frames
  4. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    1 frame
  5. Guava
    AbstractListeningExecutorService.submit
    1. com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
    2. com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:55)
    2 frames
  6. com.atlassian.confluence
    RemoteContentServiceImpl.create
    1. com.atlassian.confluence.rest.client.PromisingExecutorService.submit(PromisingExecutorService.java:65)
    2. com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:145)
    3. com.atlassian.confluence.rest.client.AbstractRemoteService.postFuture(AbstractRemoteService.java:140)
    4. com.atlassian.confluence.rest.client.RemoteContentServiceImpl.create(RemoteContentServiceImpl.java:198)
    4 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  8. com.atlassian.confluence
    RemoteServiceProxyCreator$1.invoke
    1. com.atlassian.confluence.rest.client.proxy.RemoteServiceProxyCreator$1.invoke(RemoteServiceProxyCreator.java:59)
    1 frame
  9. com.sun.proxy
    $Proxy15.create
    1. com.sun.proxy.$Proxy15.create(Unknown Source)
    1 frame
  10. com.atlassian.confluence
    MacroDiffAcceptanceTest.setUp
    1. com.atlassian.confluence.it.rpc.delegates.ContentRpc.createPage(ContentRpc.java:83)
    2. com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:624)
    3. com.atlassian.confluence.it.rpc.ConfluenceRpc.createPage(ConfluenceRpc.java:605)
    4. com.atlassian.confluence.MacroDiffAcceptanceTest.setUp(MacroDiffAcceptanceTest.java:43)
    4 frames