java.lang.ClassCastException: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest

JIRA | Aaron Bauman | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    First, I tried a simple "cloneProject" with no extraneous or optional parameters. {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject XXX --lead johndoe --name 'XXX' --verbose}} None of my schema were cloned, nor project type nor project template. Next, I added a "template" flag, even though the "fromProject" TPLSUPPORT was created with a template: {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject --template 'Basic Service Desk' XXX --lead johndoe --name 'XXX' --verbose}} And observed the same results. Next, I tried cloneProject, specifying all the possible schema, as well as "copyProjectActors": {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject --template 'Basic Service Desk' XXX --lead johndoe --name 'XXX' --verbose --type service_desk --permissionScheme "Support Permission Scheme" --notificationScheme 'Support Notification Scheme' --issueSecurityScheme 'Private' --workflowScheme 'Support Workflow Scheme' --issueTypeScheme 'Support Issue Type Scheme' --issueTypeScreenScheme 'Support Issue Type Screen Scheme' --copyRoleActors;}} and got this error: {{Exception: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest java.lang.ClassCastException: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest at org.swift.jira.cli.helpers.ProjectHelper.cloneProject(ProjectHelper.java:421) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:810) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:288) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.jira.cli.JiraClient.main(JiraClient.java:153)}} OK, remove permissionScheme from my flags -- even though it exists and is named correctly. Now, the project gets cloned successfully, but still no schema are cloned, project actors are not copied. On finalizing, jira-cli spits out the following errors: json: {"errorMessages":["Security level for project GRASP does not exist."],"errors":{}} json: {"errorMessages":["No notification scheme associated with this project."],"errors":{}} FWIW: These final 2 errors are the same as when i use createProject

    JIRA | 1 year ago | Aaron Bauman
    java.lang.ClassCastException: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest
  2. 0

    First, I tried a simple "cloneProject" with no extraneous or optional parameters. {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject XXX --lead johndoe --name 'XXX' --verbose}} None of my schema were cloned, nor project type nor project template. Next, I added a "template" flag, even though the "fromProject" TPLSUPPORT was created with a template: {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject --template 'Basic Service Desk' XXX --lead johndoe --name 'XXX' --verbose}} And observed the same results. Next, I tried cloneProject, specifying all the possible schema, as well as "copyProjectActors": {{./jira.sh --action cloneProject --project TPLSUPPORT --toProject --template 'Basic Service Desk' XXX --lead johndoe --name 'XXX' --verbose --type service_desk --permissionScheme "Support Permission Scheme" --notificationScheme 'Support Notification Scheme' --issueSecurityScheme 'Private' --workflowScheme 'Support Workflow Scheme' --issueTypeScheme 'Support Issue Type Scheme' --issueTypeScreenScheme 'Support Issue Type Screen Scheme' --copyRoleActors;}} and got this error: {{Exception: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest java.lang.ClassCastException: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest at org.swift.jira.cli.helpers.ProjectHelper.cloneProject(ProjectHelper.java:421) at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:810) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:288) at org.swift.common.cli.CliClient.doWork(CliClient.java:433) at org.swift.jira.cli.JiraClient.main(JiraClient.java:153)}} OK, remove permissionScheme from my flags -- even though it exists and is named correctly. Now, the project gets cloned successfully, but still no schema are cloned, project actors are not copied. On finalizing, jira-cli spits out the following errors: json: {"errorMessages":["Security level for project GRASP does not exist."],"errors":{}} json: {"errorMessages":["No notification scheme associated with this project."],"errors":{}} FWIW: These final 2 errors are the same as when i use createProject

    JIRA | 1 year ago | Aaron Bauman
    java.lang.ClassCastException: org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.swift.jira.cli.objects.RemoteSchemeRest cannot be cast to org.swift.jira.cli.objects.RemotePermissionSchemeRest

      at org.swift.jira.cli.helpers.ProjectHelper.cloneProject()
    2. org.swift.jira
      JiraClient.handleRequest
      1. org.swift.jira.cli.helpers.ProjectHelper.cloneProject(ProjectHelper.java:421)
      2. org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:810)
      2 frames
    3. org.swift.common
      CliClient.doWork
      1. org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:288)
      2. org.swift.common.cli.CliClient.doWork(CliClient.java:433)
      2 frames
    4. org.swift.jira
      JiraClient.main
      1. org.swift.jira.cli.JiraClient.main(JiraClient.java:153)
      1 frame