Upgrade jira plugins from Java 8 to 11

Hello

I’m upgrading jira custom plugin from java 8 to java 11
I did changes mentioned in Bitbucket
My plugin is being built successfully, however when I upload plugin it is being automatically disabled with the following error message:

Caused by: org.osgi.framework.BundleException: Unable to resolve com.plugin.key : missing requirement [com.plugin.key[)] osgi.ee; (osgi.ee=UNKNOWN) Unresolved requirements: [[com.plugin.key osgi.ee; (osgi.ee=UNKNOWN)]

Can you advise how to debug problem further
Thanks,
Ibrahim

Hi @IbrahimItani

Could you share more logs please ?

Fabien

Sure @FabienPenchenat this is the full log

om.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: plugin-key
      at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)

      at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:260)

      at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)

      at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:97)

      at com.atlassian.plugin.manager.DefaultPluginManager.lambda$enableDependentPlugins$24(DefaultPluginManager.java:1245)

      at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)

      at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1229)

      at com.atlassian.plugin.manager.DefaultPluginManager.lambda$addPlugins$22(DefaultPluginManager.java:1214)

      at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)

      at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1114)

      at com.atlassian.jira.plugin.JiraPluginManager.addPlugins(JiraPluginManager.java:165)

      at com.atlassian.plugin.manager.DefaultPluginManager.lambda$scanForNewPlugins$14(DefaultPluginManager.java:921)

      at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)

      at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:877)

      at com.atlassian.plugin.manager.DefaultPluginManager.lambda$installPlugins$13(DefaultPluginManager.java:837)

      at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)

      at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:823)

      at com.atlassian.jira.plugin.JiraPluginManager.installPlugins(JiraPluginManager.java:175)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.base/java.lang.reflect.Method.invoke(Method.java:566)

      at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)

      at com.sun.proxy.$Proxy104.installPlugins(Unknown Source)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      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:344)

      at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)

      at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)

      at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)

      at com.sun.proxy.$Proxy1590.installPlugins(Unknown Source)

      at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:133)

      at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:128)

      at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)

      at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50)

      at jdk.internal.reflect.GeneratedMethodAccessor226.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.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)

      at com.sun.proxy.$Proxy648.doInTransaction(Unknown Source)

      at jdk.internal.reflect.GeneratedMethodAccessor226.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.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130)

      at com.sun.proxy.$Proxy648.doInTransaction(Unknown Source)

      at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)

      at jdk.internal.reflect.GeneratedMethodAccessor237.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:344)

      at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)

      at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)

      at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)

      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)

      at com.sun.proxy.$Proxy771.execute(Unknown Source)

      at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifacts(AbstractPluginInstallHandler.java:127)

      at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifact(AbstractPluginInstallHandler.java:113)

      at com.atlassian.upm.core.install.JarPluginInstallHandler.installPluginInternal(JarPluginInstallHandler.java:52)

      at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installPlugin(AbstractPluginInstallHandler.java:54)

      at com.atlassian.upm.core.install.DefaultPluginInstallationService.execute(DefaultPluginInstallationService.java:130)

      at com.atlassian.upm.core.install.DefaultPluginInstallationService.install(DefaultPluginInstallationService.java:98)

      at com.atlassian.upm.install.UpmPluginInstallationService.install(UpmPluginInstallationService.java:114)

      at com.atlassian.upm.core.rest.resources.install.InstallTask.installFromFile(InstallTask.java:153)

      at com.atlassian.upm.core.rest.resources.install.InstallFromFileTask.executeTask(InstallFromFileTask.java:36)

      at com.atlassian.upm.core.rest.resources.install.InstallTask.run(InstallTask.java:78)

      at com.atlassian.upm.core.async.AsynchronousTaskManager.executeTask(AsynchronousTaskManager.java:121)

      at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:99)

      at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:96)

      at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)

      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

      at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: org.osgi.framework.BundleException: Unable to resolve plugin [2](R 2.0): missing requirement [plugin-key [2](R 2.0)] osgi.ee; (osgi.ee=UNKNOWN) Unresolved requirements: [[plugin-key [2](R 2.0)] osgi.ee; (osgi.ee=UNKNOWN)]

      at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)

      at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)

      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)

      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992)

      at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:405)

Hello @IbrahimItani ,

Just to be sure, is the environment on which you are running your Jira is under Java 11?

Fabien

@FabienPenchenat
java 11.0.22

1 Like