Problem with the User Profile Plugin on Jira 10

Hello,

I am still struggling with making our plugin to work with Jira 10.

The only blocker is the problem mentioned here: Preparing for Jira Software 10.0 and Jira Service Management 6.0 - multiple EAPs coming your way - #269 by mklempka

To keep it simple I’ve decided to create a new, simple plugin using atlas-create-jira-plugin command.

Then I’ve created java class extending com.atlassian.jira.plugins.userprofile.AbstractUserProfilePanel
Dependency:

<dependency>
   <groupId>com.atlassian.jira</groupId>
   <artifactId>jira-user-profile-plugin</artifactId>
   <version>6.0.1</version>
   <scope>provided</scope>
   </dependency>

I’am getting following exception on plugin installation:

2024-09-26 13:04:35,227+0200 UpmAsynchronousTaskManager:thread-2 ERROR admin     [c.a.p.osgi.factory.OsgiPluginInstalledHelper] Cannot determine required plugins, cannot resolve bundle 'com.test.my-plugin'
2024-09-26 13:04:35,234+0200 UpmAsynchronousTaskManager:thread-2 ERROR admin     [c.a.p.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.test.my-plugin' : Unable to resolve com.test.my-plugin [246](R 246.0): missing requirement [com.test.my-plugin [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.jira.plugins.userprofile) Unresolved requirements: [[com.test.my-plugin [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.jira.plugins.userprofile)].  This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
2024-09-26 13:04:35,234+0200 UpmAsynchronousTaskManager:thread-2 WARN admin     [c.a.plugin.impl.AbstractPlugin] Unable to enable plugin 'com.test.my-plugin'
2024-09-26 13:04:35,234+0200 UpmAsynchronousTaskManager:thread-2 WARN admin     [c.a.plugin.impl.AbstractPlugin] Because of this exception
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.test.my-plugin
	at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:423)
	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:1243)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1227)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$addPlugins$22(DefaultPluginManager.java:1212)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1112)
	at com.atlassian.jira.plugin.JiraPluginManager.addPlugins(JiraPluginManager.java:165)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$scanForNewPlugins$14(DefaultPluginManager.java:919)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:875)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$installPlugins$13(DefaultPluginManager.java:835)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:821)
	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:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at jdk.proxy3/jdk.proxy3.$Proxy333.installPlugins(Unknown Source)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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 jdk.proxy6/jdk.proxy6.$Proxy920.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:49)
	at jdk.internal.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at jdk.proxy3/jdk.proxy3.$Proxy398.doInTransaction(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor222.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130)
	at jdk.proxy3/jdk.proxy3.$Proxy398.doInTransaction(Unknown Source)
	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
	at jdk.internal.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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 jdk.proxy6/jdk.proxy6.$Proxy924.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:140)
	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:122)
	at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:100)
	at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:97)
	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:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.osgi.framework.BundleException: Unable to resolve com.test.my-plugin [246](R 246.0): missing requirement [com.test.my-plugin [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.jira.plugins.userprofile) Unresolved requirements: [[com.test.my-plugin [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.jira.plugins.userprofile)]
	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:404)
	... 97 more


It’s working with any Jira 9 (with java 8 obv.).
Tested on Jira 10.0.0, 10.0.1, 10.1.0-EAP02 without success.

I would appreciate any help,
Kind regards

1 Like