Cannot apply license to Jira Data Center
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When applying a Jira license via the page ⚙ > Applications > Versions & licenses, there are situations when the progress bar goes back and forth indefinitely or the message "Your Jira Core license will be impacted by this change" appears on the screen.
Diagnosis
- The UI shows "Updating license key..."
- The progress bar goes back and forth indefinitely.
- In some scenarios, the message "Your Jira Core license will be impacted by this change" is displayed.
In the application logs, warnings or errors similar to the following ones are logged:
Example 1
2021-05-03 09:08:58,389-0400 https-jsse-nio-8443-exec-21 url: /rest/plugins/applications/1.0/installed/jira-software/license; user: n2114d WARN n2114d 548x334350x1 1phcuyt 147.170.214.176,146.69.168.229 /rest/plugins/applications/1.0/installed/jira-software/license [c.a.u.l.internal.impl.PluginLicenseRepositoryImpl] Unexpected error decoding stored license for 'com.onresolve.jira.groovy.groovyrunner': java.lang.ClassCastException: com.atlassian.upm.license.internal.HostApplicationLicense cannot be cast to com.atlassian.upm.license.internal.HostApplicationLicense 2021-05-03 09:08:58,389-0400 https-jsse-nio-8443-exec-21 url: /rest/plugins/applications/1.0/installed/jira-software/license; user: n2114d WARN n2114d 548x334350x1 1phcuyt 147.170.214.176,146.69.168.229 /rest/plugins/applications/1.0/installed/jira-software/license [c.a.u.l.internal.impl.PluginLicenseRepositoryImpl] Unexpected error decoding stored license for 'com.innovalog.jmcf.jira-misc-custom-fields': java.lang.ClassCastException: com.atlassian.upm.license.internal.HostApplicationLicense cannot be cast to com.atlassian.upm.license.internal.HostApplicationLicense
Example 2
2021-02-24 06:18:25,758+0100 http-nio-8080-exec-29 ERROR jorkuijp 378x582x1 j3azhn 172.20.143.59,172.28.138.59 /rest/plugins/applications/1.0/installed/jira-software/license [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: com.atlassian.upm.api.util.Option$Some cannot be cast to com.atlassian.upm.api.util.Option java.lang.ClassCastException: com.atlassian.upm.api.util.Option$Some cannot be cast to com.atlassian.upm.api.util.Option at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getCachedLicense(PluginLicenseRepositoryImpl.java:339) at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getPluginLicense(PluginLicenseRepositoryImpl.java:149) at com.atlassian.upm.license.DataCenterCrossgradeablePluginsImpl.crossgradeNeeded(DataCenterCrossgradeablePluginsImpl.java:48) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
Example 3
2021-04-09 08:46:01,858 http-nio-8080-exec-10360 url: /jira/rest/greenhopper/1.0/xboard/issue/details.json; user: et0hevl ERROR et0hevl 526x82536599x5 1rrm4pw 192.168.20.92,192.168.20.53 /rest/greenhopper/1.0/xboard/issue/details.json [web.rapid.issue.IssueResource] Unable to complete GreenHopper REST method java.lang.ClassCastException: class com.atlassian.upm.api.util.Option$4 cannot be cast to class com.atlassian.upm.api.util.Option (com.atlassian.upm.api.util.Option$4 is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @60fd5754; com.atlassian.upm.api.util.Option is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @cf18e4c) at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getCachedLicense(PluginLicenseRepositoryImpl.java:339) at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getPluginLicense(PluginLicenseRepositoryImpl.java:149) at com.atlassian.upm.license.internal.impl.PluginLicenseManagerImpl.getLicense(PluginLicenseManagerImpl.java:45) at jdk.internal.reflect.GeneratedMethodAccessor711.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) ... at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy5603.getLicense(Unknown Source) at net.seibertmedia.agilehive.management.license.DefaultLicenseService.checkLicense(DefaultLicenseService.java:27) at net.seibertmedia.agilehive.management.license.BestMatchLicenseStrategy.lambda$checkLicense$1(BestMatchLicenseStrategy.java:26)
Example 4
2021-06-11 04:33:59,719+0000 http-nio-8080-exec-105 ERROR [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] in context with path [] threw exception java.lang.ClassCastException: class com.atlassian.upm.api.util.Option$Some cannot be cast to class com.atlassian.upm.api.util.Option (com.atlassian.upm.api.util.Option$Some is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3ca3df9e; com.atlassian.upm.api.util.Option is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3c8d7e0c) at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getCachedLicense(PluginLicenseRepositoryImpl.java:339) at com.atlassian.upm.license.internal.impl.PluginLicenseRepositoryImpl.getPluginLicense(PluginLicenseRepositoryImpl.java:149) at com.atlassian.upm.license.internal.impl.PluginLicenseManagerImpl.getLicense(PluginLicenseManagerImpl.java:45) at jdk.internal.reflect.GeneratedMethodAccessor447.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) ... at com.itlab.jira.plugins.extender.helper.LicenseHelper.isLicenseIsValid(LicenseHelper.java:29) at com.itlab.jira.plugins.extender.helper.ToolsHelper.isLicenseIsValid(ToolsHelper.java:212) at com.itlab.jira.plugins.extender.FilterContextUser.doFilter(FilterContextUser.java:217)
Note the apps reported in the errors, for example:
net.seibertmedia.jira.plugins.autopage (AutoPage - Automated Page Creation)
- com.itlab.jira.plugins.extender (Extender for JIRA)
Example 5:
Plugin related errors/rest/plugins/applications/1.0/installed/jira-software/license [c.a.u.l.internal.impl.PluginLicenseRepositoryImpl] Unexpected error decoding stored license for 'com.wittified.atl-announcer-jira': java.lang.ClassCastException: class com.atlassian.upm.license.internal.HostApplicationLicense cannot be cast to class com.atlassian.upm.license.internal.HostApplicationLicense (com.atlassian.upm.license.internal.HostApplicationLicense is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3bdd2174; com.atlassian.upm.license.internal.HostApplicationLicense is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @29f7ead)
/rest/plugins/applications/1.0/installed/jira-software/license [c.a.u.l.internal.impl.PluginLicenseRepositoryImpl] Unexpected error decoding stored license for 'com.onresolve.jira.groovy.groovyrunner': java.lang.ClassCastException: class com.atlassian.upm.license.internal.HostApplicationLicense cannot be cast to class com.atlassian.upm.license.internal.HostApplicationLicense (com.atlassian.upm.license.internal.HostApplicationLicense is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @3bdd2174; com.atlassian.upm.license.internal.HostApplicationLicense is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @29f7ead)
Here the above code blocks are reporting problems for the following plugins:
- Announcer for Jira ('com.wittified.atl-announcer-jira')
- ScriptRunner for Jira ('com.onresolve.jira.groovy.groovyrunner')
Cause
Some 3rd party add-ons are preventing the Jira license from being updated.
Solution
Safe mode method
The trick is to find which 3rd party add-on(s) are causing this issue. One way to figure it out is to:
- Enable Safe mode
- Check if the issue goes away
- if the issue goes away, then re-enable each 3rd party add-on 1 by 1, until the issue occurs again, then the last add-on you enabled is the culprit
- Inspect the StackTrace for any custom plugin
Note: Some admins found that one of the following add-ons was the culprit and needed to be disabled (or un-installed if disabling it was not enough to fix the problem):
- SAFe EPIC to Feature Translator for Jira
- Projectrak - Project Tracking for Jira
- Links Hierarchy - Full dependency viewer
- AutoPage - Automated Page Creation
- Structure plugin
- Agile Poker for Jira - Planning & Estimation
- Extender for JIRA
- Note that a fix was implemented for this add-on in version 2.11.0, as per 2022-01-21 | Extender for Jira 2.11.0 Release. Therefore, if you verified that this add-on was causing the issue, we recommend to upgrade this add-on to 2.11.0 or any higher version.
- Integrity Check for Jira
We also observed some additional problematic plugins that might interrupt updating the license key in Jira and here are a few more:
- Announcer for Jira
- ScriptRunner for Jira
- JSU Automation Suite for Jira Workflows
- Custom Content for Jira
- Delegated Project Creator for Jira
Update the license via API method
How to retrieve application license details or set the license via private REST API in Jira 7+
Retrying on a different browser
We had reports of the error from example 2 being bypassed by retrying the license update.
- For that simply close the browser and retry it on a new window/tab.
Update the license via the Jira Database
Requires Jira to be restarted.
Another way to update a Jira license without having to disable each 3rd party add-on 1 by 1 is to do via the Jira Database. Please refer to the KB article How to manage Jira server license using database queries for more details about this solution.