java.lang.Exception: {"statusCode":501,"message":"Cannot convert from null to storage"}

JIRA | Thomas Herzog | 2 years ago
  1. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-638].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}I have just tried to create an confluence page form a groovy script and it failed for this reason: {code} 2015-02-19 14:26:54,343 http-bio-8090-exec-1 DEBUG ccadmin 866x14257x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [jira.groovy.condition.CurrentUSerIsComponentLead] Confluence Link: Confluence (Curecomp) (b921a2fe-2b14-33ec-a34c-cb63fb11956d) http://confluence.curecomp.com com.atlassian.applinks.application.confluence.ConfluenceApplicationTypeImpl@1858a62d 2015-02-19 14:27:24,649 http-bio-8090-exec-23 DEBUG ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [jira.groovy.condition.CurrentUSerIsComponentLead] Confluence Link: Confluence (Curecomp) (b921a2fe-2b14-33ec-a34c-cb63fb11956d) http://confluence.curecomp.com com.atlassian.applinks.application.confluence.ConfluenceApplicationTypeImpl@1858a62d 2015-02-19 14:27:24,689 http-bio-8090-exec-23 WARN ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [apache.commons.httpclient.HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] ************************************************************************************* 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] Condition failed on issue: CCAPP-5, java.lang.Exception: {"statusCode":501,"message":"Cannot convert from null to storage"} at examples.docs.Script6$1.handle(Script6.groovy:77) at com.atlassian.applinks.core.auth.trusted.TrustedResponseHandler.handle(TrustedResponseHandler.java:36) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:145) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:142) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166) at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:351) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.execute(JerseyRequest.java:141) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:73) at com.atlassian.applinks.core.auth.trusted.TrustedRequest.execute(TrustedRequest.java:55) at com.atlassian.sal.api.net.Request$execute$1.call(Unknown Source) at examples.docs.Script6.run(Script6.groovy:73) 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] Script follows: {code} Then i have taken a look at the confluence REST API docs and the example says: {code} //This creates a page in a space. var username = "admin"; var password = "admin"; var jsondata = {"type":"page", "title":"My Test Page", "space":{"key":"TST"}, "body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}; $.ajax ({ type: "POST", url: "http://localhost:8080/confluence/rest/api/content/", contentType:"application/json; charset=utf-8", dataType: "json", async: false, headers: { "Authorization": "Basic " + btoa(username+ ":" + password) }, data: JSON.stringify(jsondata), success: function (){ console.log(&#39;Page saved!&#39;); }, error : function(xhr, errorText){ console.log(&#39;Error &#39;+ xhr.responseText); } }); {code} Maybe I am understand something wrong but it seems that it is *body : storage : value* and not *body : wiki : value* did they have changed something or is there a difference between *storage *and *wiki*

    JIRA | 2 years ago | Thomas Herzog
    java.lang.Exception: {"statusCode":501,"message":"Cannot convert from null to storage"}
  2. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-638].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}I have just tried to create an confluence page form a groovy script and it failed for this reason: {code} 2015-02-19 14:26:54,343 http-bio-8090-exec-1 DEBUG ccadmin 866x14257x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [jira.groovy.condition.CurrentUSerIsComponentLead] Confluence Link: Confluence (Curecomp) (b921a2fe-2b14-33ec-a34c-cb63fb11956d) http://confluence.curecomp.com com.atlassian.applinks.application.confluence.ConfluenceApplicationTypeImpl@1858a62d 2015-02-19 14:27:24,649 http-bio-8090-exec-23 DEBUG ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [jira.groovy.condition.CurrentUSerIsComponentLead] Confluence Link: Confluence (Curecomp) (b921a2fe-2b14-33ec-a34c-cb63fb11956d) http://confluence.curecomp.com com.atlassian.applinks.application.confluence.ConfluenceApplicationTypeImpl@1858a62d 2015-02-19 14:27:24,689 http-bio-8090-exec-23 WARN ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [apache.commons.httpclient.HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] ************************************************************************************* 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] Condition failed on issue: CCAPP-5, java.lang.Exception: {"statusCode":501,"message":"Cannot convert from null to storage"} at examples.docs.Script6$1.handle(Script6.groovy:77) at com.atlassian.applinks.core.auth.trusted.TrustedResponseHandler.handle(TrustedResponseHandler.java:36) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:145) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:142) at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166) at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:351) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161) at com.atlassian.plugins.rest.module.jersey.JerseyRequest.execute(JerseyRequest.java:141) at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:73) at com.atlassian.applinks.core.auth.trusted.TrustedRequest.execute(TrustedRequest.java:55) at com.atlassian.sal.api.net.Request$execute$1.call(Unknown Source) at examples.docs.Script6.run(Script6.groovy:73) 2015-02-19 14:27:24,694 http-bio-8090-exec-23 ERROR ccadmin 867x14258x1 1ne67d1 10.70.34.4,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.conditions.SimpleScriptedCondition/preview [canned.jira.utils.ConditionUtils] Script follows: {code} Then i have taken a look at the confluence REST API docs and the example says: {code} //This creates a page in a space. var username = "admin"; var password = "admin"; var jsondata = {"type":"page", "title":"My Test Page", "space":{"key":"TST"}, "body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}; $.ajax ({ type: "POST", url: "http://localhost:8080/confluence/rest/api/content/", contentType:"application/json; charset=utf-8", dataType: "json", async: false, headers: { "Authorization": "Basic " + btoa(username+ ":" + password) }, data: JSON.stringify(jsondata), success: function (){ console.log(&#39;Page saved!&#39;); }, error : function(xhr, errorText){ console.log(&#39;Error &#39;+ xhr.responseText); } }); {code} Maybe I am understand something wrong but it seems that it is *body : storage : value* and not *body : wiki : value* did they have changed something or is there a difference between *storage *and *wiki*

    JIRA | 2 years ago | Thomas Herzog
    java.lang.Exception: {"statusCode":501,"message":"Cannot convert from null to storage"}
  3. 0

    Stream behavior in body of response

    Google Groups | 5 years ago | David
    java.lang.RuntimeException: java.lang.Exception: Cannot convert 10 to ChannelBuffer.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.Exception: GoogleAuthenticationController:ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null}

    GitHub | 1 year ago | JavalSoftBot
    java.lang.Exception: GoogleAuthenticationController:ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null}
  6. 0

    Invoke Web service&nbsp; without Timestamp. Timestamp is missing from message.

    Oracle Community | 4 years ago | user358149
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Timestamp is missing from message. Message cannot be processed without timestamp.

    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. java.lang.Exception

      {"statusCode":501,"message":"Cannot convert from null to storage"}

      at examples.docs.Script6$1.handle()
    2. examples.docs
      Script6$1.handle
      1. examples.docs.Script6$1.handle(Script6.groovy:77)
      1 frame
    3. com.atlassian.applinks
      TrustedResponseHandler.handle
      1. com.atlassian.applinks.core.auth.trusted.TrustedResponseHandler.handle(TrustedResponseHandler.java:36)
      1 frame
    4. com.atlassian.plugins
      JerseyRequest$2.handle
      1. com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:145)
      2. com.atlassian.plugins.rest.module.jersey.JerseyRequest$1.handle(JerseyRequest.java:142)
      3. com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:166)
      3 frames
    5. com.atlassian.sal
      HttpClientRequest.executeAndReturn
      1. com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:351)
      1 frame
    6. com.atlassian.plugins
      JerseyRequest.execute
      1. com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:161)
      2. com.atlassian.plugins.rest.module.jersey.JerseyRequest.execute(JerseyRequest.java:141)
      2 frames
    7. com.atlassian.applinks
      TrustedRequest.execute
      1. com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:73)
      2. com.atlassian.applinks.core.auth.trusted.TrustedRequest.execute(TrustedRequest.java:55)
      2 frames
    8. com.atlassian.sal
      Request$execute$1.call
      1. com.atlassian.sal.api.net.Request$execute$1.call(Unknown Source)
      1 frame
    9. examples.docs
      Script6.run
      1. examples.docs.Script6.run(Script6.groovy:73)
      1 frame