Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Which .java files can be used by ScriptRunner and differences between 8.5 and 8.13 (OSGi model)



I'm working intensively with Scriptrunner, and noted that for some .java it won't import classes.

so my current example is:

import com.onresolve.scriptrunner.runner.customisers.PluginModule

import com.onresolve.scriptrunner.runner.customisers.WithPlugin

import com.atlassian.applinks.core.DefaultApplicationLinkService



DefaultApplicationLinkService defaultApplicationLinkService;
log.error defaultApplicationLinkService.getApplicationLinks()


The above code works with jira 8.5.1 but won't work with 8.13.2 (Scriptrunner in the same version) In 8.13.2 it generates error:

Can't find plugin module or OSGi service for class: com.atlassian.applinks.core.DefaultApplicationLinkService


DefaultApplicationLinkService is located in:

applinks-plugin-7.0.0-MNSTR-2473-sources.jar (jira 8.8.1)

applinks-plugin-8.0.0-sources.jar (jira 8.13) 

classes are locates in the same place all looks the same (in area of file of course.) 


what more the following code works:

import com.atlassian.jira.component.ComponentAccessor

import com.onresolve.scriptrunner.runner.customisers.PluginModule

import com.onresolve.scriptrunner.runner.customisers.WithPluginimport com.atlassian.applinks.api.ApplicationLinkService

import com.atlassian.applinks.core.ApplinkStatusService

ApplicationLinkService applicationLinkService = ComponentAccessor.getComponent(ApplicationLinkService)



ApplinkStatusService applinkStatusService;
applicationLinkService.getApplicationLinks().each{    log.error it    log.error applinkStatusService.getApplinkStatus(it.getId())} 

 ApplinkStatusService is located in the same file in the same folder. 


So my question is how to determine which .java files are usable and which are not...

there are some difference in pom.xml files for this plugin which if I understand correctly in <instructions> section should contain "OSGi declaration" but I don't actually know how to read this file and if this is correct file to seek the differences. 

0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you