Add-on fails to start

Hi all! This is my first question as a developer!

As a add-on developer, I’m developing a prototype plugin for my first work(debut!).
The goal is checking permissions group holds for project and displaying it.
I think it is the best way to call permission scheme applied to each project, and
check if the permissions in the permission scheme are granted to the group.

So, I tried to import an interface PermissionGrant, but failed to access on my success page(time out) even if build succeeded.(I’m using webwork action framework)

There are no problems with plugin before importing the interface.
The other interfaces are working fine.

I tried to delete cache(IDEA, plugin) and invalidate anti-virus scanner.
I also tried to invalidate Spring Scanner. But I cannot resolve this.

JIRA’s version used for plugin is 7.2.2 not cloud.
I would be appreciate that if I have some advice!

Best Regards

Log is the following.

2017-06-16 14:16:47,497 QuickReload - Plugin Installer INFO [c.a.plugin.util.WaitUntil] Plugins that have yet to be enabled: (1): [jp.ricksoft.recruitproto], 0 seconds remaining
2017-06-16 14:16:48,506 QuickReload - Plugin Installer INFO [c.a.plugin.manager.DefaultPluginManager] Disabling jp.ricksoft.recruitproto
2017-06-16 14:16:48,506 QuickReload - Plugin Installer ERROR [c.a.p.osgi.factory.OsgiPlugin] Plugin ‘jp.ricksoft.recruitproto’ never resolved service ‘&permissionGrant’ with filter ‘(&(objectClass=com.atlassian.jira.permission.PermissionGrant)(objectClass=com.atlassian.jira.permission.PermissionGrant))’

If there are anyone who have a good idea for my work, please let me know your idea!
Thank you.

I don’t think PermissionGrant is injectable. is though and probably has all of the api calls that you need to check permissions.

Hi Daniel,
Thank you for your response.

Thanks to your opinion, I can get another idea for work.
But, Could you let me know why you think that PermissionGrant interface is not injectable?

Best Regards

Couple of reasons:

  • It’s not marked with @PublicApi (only use non Public APIs if you have to - and even then be careful :slight_smile: ).
  • In the source code - it’s not listed in com/atlassian/jira/

You’ll want to inject PermissionManager. :slight_smile:

1 Like

Thank you Daniel!:grinning:
Best Regards!