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

Atlassian JIRA | Kenny MacLeod | 1 year ago
  1. 0

    This seems to be a problem with the way that Jersey handles things, but during development I regularly see errors along the lines of this one from https://collaboration-bamboo.internal.atlassian.com/browse/CBP-CBPCSB-POMCONF-132/test/case/93206725: {noformat} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and Java type class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, 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.get(WebResource.java:503) at com.atlassian.confluence.it.rpc.delegates.admin.PluginsRpc.isPluginEnabled(PluginsRpc.java:94) at com.atlassian.confluence.it.plugin.TestPlugins.disablePluginIfEnabled(TestPlugins.java:120) at com.atlassian.confluence.it.plugin.TestPlugins.disableUnneededPluginsAndModules(TestPlugins.java:114) at com.atlassian.confluence.it.plugin.TestPlugins.setupTestPluginsForWebDriver(TestPlugins.java:60) at com.atlassian.confluence.webdriver.AbstractWebDriverTest.start(AbstractWebDriverTest.java:62) {noformat} The error message is opaque, and gives no indication of what the problem really is, but I'm guessing the server is sending back something that Jersey hasn't been configured to handle, and it's reporting the problem in a very low-level fashion. Perhaps the Confluence REST API client can configure Jersey to provide something more helpful here, perhaps with a generic fallback message reader that can handle anything, but which reports a nice diagnostically-helpful error message?

    Atlassian JIRA | 1 year ago | Kenny MacLeod
    com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and Java type class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and MIME media type application/octet-stream was not found
  2. 0

    This seems to be a problem with the way that Jersey handles things, but during development I regularly see errors along the lines of this one from https://collaboration-bamboo.internal.atlassian.com/browse/CBP-CBPCSB-POMCONF-132/test/case/93206725: {noformat} com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and Java type class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, 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.get(WebResource.java:503) at com.atlassian.confluence.it.rpc.delegates.admin.PluginsRpc.isPluginEnabled(PluginsRpc.java:94) at com.atlassian.confluence.it.plugin.TestPlugins.disablePluginIfEnabled(TestPlugins.java:120) at com.atlassian.confluence.it.plugin.TestPlugins.disableUnneededPluginsAndModules(TestPlugins.java:114) at com.atlassian.confluence.it.plugin.TestPlugins.setupTestPluginsForWebDriver(TestPlugins.java:60) at com.atlassian.confluence.webdriver.AbstractWebDriverTest.start(AbstractWebDriverTest.java:62) {noformat} The error message is opaque, and gives no indication of what the problem really is, but I'm guessing the server is sending back something that Jersey hasn't been configured to handle, and it's reporting the problem in a very low-level fashion. Perhaps the Confluence REST API client can configure Jersey to provide something more helpful here, perhaps with a generic fallback message reader that can handle anything, but which reports a nice diagnostically-helpful error message?

    Atlassian JIRA | 1 year ago | Kenny MacLeod
    com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and Java type class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and MIME media type application/octet-stream was not found
  3. 0

    GitHub comment 12#8908685

    GitHub | 4 years ago | praveenkrishnan81
    java.lang.IllegalStateException: com.sun.jersey.api.client.ClientHandlerException: java.lang.IllegalStateException: SSLContextImpl is not initialized
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClientHandlerException in REST client only when executing jar file

    Stack Overflow | 3 years ago | elias
    com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/xml was not found
  6. 0

    Why do I get a connection refused?

    Stack Overflow | 4 years ago | Burkhard
    com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect

    7 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.it.rpc.delegates.admin.model.RestPlugin, and Java type class com.atlassian.confluence.it.rpc.delegates.admin.model.RestPlugin, and MIME media type application/octet-stream was not found

      at com.sun.jersey.api.client.ClientResponse.getEntity()
    2. jersey-client
      WebResource$Builder.get
      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.get(WebResource.java:503)
      5 frames
    3. com.atlassian.confluence
      AbstractWebDriverTest.start
      1. com.atlassian.confluence.it.rpc.delegates.admin.PluginsRpc.isPluginEnabled(PluginsRpc.java:94)
      2. com.atlassian.confluence.it.plugin.TestPlugins.disablePluginIfEnabled(TestPlugins.java:120)
      3. com.atlassian.confluence.it.plugin.TestPlugins.disableUnneededPluginsAndModules(TestPlugins.java:114)
      4. com.atlassian.confluence.it.plugin.TestPlugins.setupTestPluginsForWebDriver(TestPlugins.java:60)
      5. com.atlassian.confluence.webdriver.AbstractWebDriverTest.start(AbstractWebDriverTest.java:62)
      5 frames