Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-856

App assessment with Discoverable Listeners throws java.lang.ClassCastException in CCMA

XMLWordPrintable

    • 2
    • Minor

      Issue Summary

      Using Discoverable Listeners in Confluence Cloud Migration Assistant, when agreeing to the access scopes error toast pops up and a java.lang.ClassCastException is thrown in atlassian-confluence.log.

      Steps to Reproduce

      1. Install CCMA and an app that has an automatic migration path
      2. Set the app as Needed in Cloud
      3. Install the cloud version of the app
      4. In Agree to app migration click View policy
      5. Click Confirm

      Expected Results

      The policy is approved and the message changes.

      Actual Results

      The toast pop-up

      The message stays as

      The policy you agreed to has been updated. Review changes and agree again before your app data can be migrated.

      The below exception is thrown in the atlassian-confluence.log file:

      2021-10-13 15:39:58,791 ERROR [http-nio-1990-exec-7] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: clas
      s com.atlassian.migration.app.AccessScope cannot be cast to class com.atlassian.migration.app.AccessScope (com.atlassian.migration.app.AccessScope is in unnam
      ed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @6356133e; com.atlassian.migration.app.AccessScope is in unnamed module of l
      oader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3788b901)
       -- referer: http://localhost:1990/confluence/admin/migration.action | url: /confluence/rest/migration/latest/app/consent/update | traceId: 91794a2c009fba38 |
       userName: admin
      java.lang.ClassCastException: class com.atlassian.migration.app.AccessScope cannot be cast to class com.atlassian.migration.app.AccessScope (com.atlassian.mig
      ration.app.AccessScope is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @6356133e; com.atlassian.migration.app.Acc
      essScope is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3788b901)
              at java.base/java.lang.Iterable.forEach(Iterable.java:75)
              at com.atlassian.migration.agent.service.app.AppAccessScopeService.lambda$updatedAppAssessScopes$1(AppAccessScopeService.java:47)
              at com.atlassian.migration.agent.store.tx.PluginTransactionTemplate.lambda$on$0(PluginTransactionTemplate.java:10)
              at com.atlassian.migration.agent.store.jpa.impl.DefaultPluginTransactionTemplate.on(DefaultPluginTransactionTemplate.java:40)
              at com.atlassian.migration.agent.store.tx.PluginTransactionTemplate.on(PluginTransactionTemplate.java:9)
              at com.atlassian.migration.agent.store.tx.PluginTransactionTemplate.write(PluginTransactionTemplate.java:28)
              at com.atlassian.migration.agent.service.app.AppAccessScopeService.updatedAppAssessScopes(AppAccessScopeService.java:43)
              at com.atlassian.migration.agent.service.impl.AppAssessmentFacade.updateAppConsent(AppAssessmentFacade.java:142)
              at com.atlassian.migration.agent.rest.AppAssessmentResource.updateAppConsent(AppAssessmentResource.java:87)
      

      Workaround

      The only workaround is to use dev-mode however this is not acceptable for end users.

              jrichards@atlassian.com James Richards
              jrichards@atlassian.com James Richards
              Votes:
              4 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: