com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

Atlassian JIRA | Hossein Toussi [Atlassian] | 3 years ago
  1. 0

    [CONF-31132] Unable to create How-To articles via create template macro button when space key is an Integer - Atlassian JIRA

    atlassian.com | 6 months ago
    com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  2. 0

    h4.Steps to Reproduce: # Create a space and select an Integer for the space key # Create a How-to article for the space. # Navigate to the space, and go to How-To articles page. !one.png|width=500! # Try to create a How to article using the *Add How-To Article* button. h4.Actual Results: The How-To article will not get created. !create.png|width=500! Error in the logs: {code} ERROR [http-8090-6] [jersey.spi.container.ContainerResponse] logException Mapped exception to response: 500 (Internal Server Error) -- url: /rest/create-dialog/1.0/content-blueprint/create-draft | userName: admin | referer: http://localhost:8090/display/1/How-To+Articles?src=spaceshortcut com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.plugins.createcontent.rest.ContentBlueprintResource.createDraft(ContentBlueprintResource.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ... Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.plugins.createcontent.api.contextproviders.BlueprintContext.getSpaceKey(BlueprintContext.java:60) at com.atlassian.confluence.plugins.confluence_kb_space_blueprint.ContentTemplateContextProvider.updateBlueprintContext(ContentTemplateContextProvider.java:46) at com.atlassian.confluence.plugins.createcontent.api.contextproviders.AbstractBlueprintContextProvider.getContextMap(AbstractBlueprintContextProvider.java:26) {code} h4.Findings: - It is possible to create How-To article from the top bar {{Create > How-To Article}}. - This behavior will not be the same if the space key is not an Integer. Articles will be created successfully.

    Atlassian JIRA | 3 years ago | Hossein Toussi [Atlassian]
    com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
  3. 0

    [CONF-31132] Unable to create How-To articles via create template macro button when space key is an Integer - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang. cannot be to java.lang. at com.atlassian.confluence.plugins.createcontent. .ContentBlueprintResource.createDraft(ContentBlueprintResource.java:90)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [CONF-31132] Unable to create How-To articles via create template macro button when space key is an Integer - Atlassian JIRA

    atlassian.com | 6 months ago
    com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang. cannot be to java.lang. at com.atlassian.confluence.plugins.createcontent. .ContentBlueprintResource.createDraft(ContentBlueprintResource.java:90)

    Root Cause Analysis

    1. com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException

      java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

      at com.atlassian.confluence.plugins.createcontent.rest.ContentBlueprintResource.createDraft()
    2. com.atlassian.confluence
      ContentBlueprintResource.createDraft
      1. com.atlassian.confluence.plugins.createcontent.rest.ContentBlueprintResource.createDraft(ContentBlueprintResource.java:90)
      1 frame
    3. Java RT
      NativeMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      2 frames