Preparing for Jira Software 10.0 and Jira Service Management 6.0 - multiple EAPs coming your way

Hello! When I upload my jira custom 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

1 Like

Hello all,

I’m trying to build a version of our app on Jira 10, I migrated our services to REST v2 and at first glance it seemed fine
However after a bit more testing some functionalities were broken and so far I seem to have tracked it down to some of our Servlet Filters not being executed. It seems that any filter with location after-decoding or before-login is just not executed. In fact if I take my filter and just switch it to before-decoration then its doFilter method is called.
Obviously I can’t just switch all my before-login filters to a later location so I’m wondering if anyone has run into this issue of has any idea how that can be solved

Regards,
Mathieu

1 Like

Hello, I am trying to use AbstractBinder from hk2. However I am getting an exception:

Caused by: java.lang.ClassNotFoundException: org.glassfish.hk2.utilities.binding.AbstractBinder not found by com.intenso.jira.plugins.ad-integration-manager [183]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

Our plugin imports the package:


Which is exported by Jira’s System Bundle:

This is Jira 10.0 release
Could you please help me?

Hello!

Since you have added the possibility to store attachments in S3 without the previous needed flag, I was wondering what’s the way to check the attachments location now. I am looking for a solution to see if they are stored on server or in S3. I know I can check the Jira home/data/attachments directory and see if it’s empty, but I was hoping for a service or something, since there is no guarantee customers will move the previous attachments and not copy them to S3. I could also check the filestore-config.xml and see if it’s there, but again, I was hoping for a safer solution.

Thank you!

If anyone’s interested I was finally able to find the right doc which almost entirely explains what I’m seeing: https://developer.atlassian.com/platform/marketplace/dc-apps-platform-7-preparing-for-secure-endpoints/#overview-of-changes
Most notably:

  • UnrestrictedAccess annotations now apply to servlet-filters and servlets as well (pretty logical and my main assumption at the time)
  • Contrary to REST endpoints which can accept com.atlassian.plugins.rest.api.security.annotation the servlet artifacts can only use com.atlassian.annotations.security (this is where I wasted a lot of time because I only tried with the rest.api annotations at first)
  • Every filter in location after-encoding or before-login is assumed to be un-authenticated (obviously it isn’t when the filter is supposed to execute but the request can be properly logged in down the chain) and has to be annotated UnrestrictedAccess

The last point isn’t really documented but it is somewhat logical (although Jira could just as well assume any before-login servler-filter is UnrestrictedAccess because what else could it be)

3 Likes

I have one more problem regarding Jira 10 upgrade. In our app we extend com.atlassian.jira.plugins.userprofile.AbstractUserProfilePanel
from com.atlassian.jira:jira-user-profile-plugin:6.0.0 (Jira 10).
It’s causing following error upon plugin start:

2024-09-09 16:57:27,878+0200 ThreadPoolAsyncTaskExecutor::Thread 25 ERROR      [o.e.g.b.e.i.dependencies.startup.DependencyWaiterApplicationContextExecutor] Unable to create application context for [com.intenso.jira.plugins.ad-integration-manager], unsatisfied dependencies: none
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.intenso.jira.plugins.admanager.panel.CustomFieldPortalPanel]; nested exception is java.io.FileNotFoundException: OSGi resource[classpath:com/atlassian/jira/plugins/userprofile/AbstractUserProfilePanel.class|bnd.id=245|bnd.sym=com.intenso.jira.plugins.ad-integration-manager] cannot be resolved to URL because it does not exist
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331)
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanDefinitionRegistryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:521)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:419)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:359)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:251)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:217)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:224)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:177)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:154)
	at org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager$1.run(LifecycleManager.java:213)
	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: java.io.FileNotFoundException: OSGi resource[classpath:com/atlassian/jira/plugins/userprofile/AbstractUserProfilePanel.class|bnd.id=245|bnd.sym=com.intenso.jira.plugins.ad-integration-manager] cannot be resolved to URL because it does not exist
	at org.eclipse.gemini.blueprint.io.OsgiBundleResource.getURL(OsgiBundleResource.java:229)
	at org.eclipse.gemini.blueprint.io.OsgiBundleResource.getInputStream(OsgiBundleResource.java:181)
	at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:55)
	at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:48)
	at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
	at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123)
	at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)
	at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:699)
	at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:1013)
	at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:340)
	at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249)
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:198)
	at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:180)
	... 15 more

Everything works on Jira 9.x with the same lib but different version (3.0.8, provided).
Any changes here?

I see there is an explicit exclusion for both packages

org.glassfish.hk2.*
org.glassfish.jersey.*

in
.../atlassian-jira-software-10.0.1-standalone/atlassian-jira/WEB-INF/classes/osgi/public-packages-excludes.txt
which prevents our plugin access to them.

Is there any workaround?
Regards

I encountered issues while experimenting with the 10.0.1 version of Jira, specifically with the new web item provider API. The core problem is that the module descriptor consistently returns null. This issue persists across initial attempts in our application, where the init method fails to execute upon both fragment creation and subsequent render triggers.

Further testing reveals that the getItems method is called as expected, yet the module descriptor remains null so I am unable to get any params from the module descriptor.

To isolate the issue, I created a minimal plugin using the atlas-create-jira-plugin command, incorporating a class identical to that in your pull request example. This setup also includes a new web section and web item provider, located in a commonly accessed section by our app’s users:


<web-section key='active-issues' name='ScriptRunner active-issues' location='find_link' weight='1'>
<label>Test section</label>
</web-section>
<web-item-provider key='my-item-provider' name='ScriptRunner web item provider - my-item-provider' section='find_link/active-issues' class='mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo'>
<param name='providerClass' value='test' />
</web-item-provider>

My repository for the minimalist Atlassian plugin is available for review/testing here. cd into the adaptavist directory when cloned to get to the root level of the maven project.

It can be executed via IDEA’s Maven tool window, using the jira:debug Maven goal.

The primary error manifests in the atlassian-jira.log within the adaptavist/target/jira/home/log directory when attempting to trigger the render by clicking the issues dropdown from the navigation bar:


2024-09-10 11:07:30,323+0100 http-nio-2990-exec-5 url: /jira/rest/api/1.0/menus/find_link; user: admin ERROR admin 667x4356x1 1hprw0s 0:0:0:0:0:0:0:1 /rest/api/1.0/menus/find_link [c.a.p.r.v2.exception.ThrowableExceptionMapper] Uncaught exception 70442082-c845-4631-b0ac-ad3ba887a8bc thrown by REST service: java.lang.NullPointerException: Cannot invoke "com.atlassian.plugin.web.api.descriptors.WebItemProviderModuleDescriptor.getParams()" because the return value of "mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo.access$000(mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo)" is null
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException: Cannot invoke "com.atlassian.plugin.web.api.descriptors.WebItemProviderModuleDescriptor.getParams()" because the return value of "mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo.access$000(mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo)" is null

As far as I can tell I am following exactly what was in your PR for the test ParamPassthroughWebItemProvider example.

When testing with debug points I cannot see the init method mattsJiraApp.fragments.ScriptWebItemProviderVersionTwo#init being triggered at all, even on re-enable startup.

I can see itemSupplier logic in com.atlassian.plugin.web.descriptors.WebItemProviderModuleDescriptor#init being hit, but the webItemProvider.init(this); never seems to hit my web item provider classes (ScriptWebItemProviderVersionTwo) init method

@mkemp Any pointers on what is going wrong here?
Repo for my minimal code attempt is here

1 Like

Apologies, you’re not going crazy, it’s our fault for not bumping Atlassian Web Fragments to 7.2.0 in Jira (10.0.1). Something’s gone wrong, I don’t know what or how until tomorrow.

After running mvn clean jira:debug, we can poke inside the adaptavist/target/jira/webapp/WEB-INF/lib/ folder and see that only atlassian-plugins-webfragment-7.0.2.jar is there (the wrong version).

If it helps in anyway, it’s obviously not Jira, but RefApp 7.1.0-rc4 has Web Fragments 7.2.0

1 Like

When migrating to jira 10 a plugin rest endpoint that upload file does not longer work.

We got a XSRF check failed even when we have an atl_token hidden input in the form.

Also good to mention that we have the same origin and referer and the problem don’t occus because of that.

Any insights folks ?

Is the upload within a user context (logged in Jira user)? Otherwise, you may have to add the @UnlicensedSiteAccess annotation.

Found a way to make work !

It seems that since Jira 10

<input type="hidden" name="atl_token" value="$atl_token" />

no longer si to work but providing the token in the url works!

<form id="form" class="aui" method="POST" action="{$baseUrl}/test?atl_token=XXX" enctype="multipart/form-data">

You should maybe update the documentation about token handling in jira 10 Form token handling

That’s weird. I’m pretty sure we still use the hidden field. I can actually see it in our file upload html. Are you sure $atl_token has the correct value?

I couldn’t make it work with the input hidden even if i’m pretty sure I have put the same value of the token in both ways

Thanks for looking into this.

Do you expect the next Jira release, e.g. 10.0.2, will contain the new 7.2.0 version of the API?

We will likely need to include such information in our release notes so our users are aware of what Jira version will work for our web item provider feature.

Yes, I can confirm Jira 10.0.2 will contain the new 7.2.0.

2 Likes

Thanks for the confirmation.

Do you have an estimate as to when 10.0.2 will be available for us to test/develop with?

considering the release cycle it will actually come in earlier within 10.1 so you should aim for that. 10.1 it’s targeted for beginning of October atm

2 Likes

Hello! When starting one of our apps in Jira 10.0.1 we see the following messages in logs:

[c.a.p.o.hook.dmz.DmzResolverHook] Package com.google.common.base is deprecated and will be made unavailable for export to plugin in a future release
[c.a.p.o.hook.dmz.DmzResolverHook] Package com.opensymphony.util is deprecated and will be made unavailable for export to plugin in a future release

When exactly can we expect an import prohibition of com.google and com.opensymphony? Will it be done in the next major Jira 11 release or earlier?

2 Likes

Hello, could you please provide an estimated timeline for when the Atlassian SDK will support creating projects compatible with Jira 10 by default? I’m uncertain about the necessary modifications to the POM file and would like to analyze the one generated by the atlas-create-jira-plugin command.

3 Likes