Active Objects for JIRA Plugin configuration for starters

Raul Gallegos August 1, 2013

Hi community,

I am changing my JIRA plugin to use ActiveObjects.

I added the parameters to my atlassian-plugin.xml, like this:

<component-import key="ao" name="Active Objects service" interface="com.atlassian.activeobjects.external.ActiveObjects">

	  <description>Component to access Active Objects functionality from the plugin</description>

	</component-import>

	

	<ao key="ao-module">

  		<description>The module configuring the Active Objects service used by this plugin</description>

  		<entity>com.zagile.jira.plugin.xmlrpc.entity.Remove</entity>

		<entity>com.zagile.jira.plugin.xmlrpc.entity.Request</entity>

		<entity>com.zagile.jira.plugin.xmlrpc.entity.Create</entity>

	</ao>

Like you can see I have three entities. Now the catalina.out from JIRA is giving this:

2013-08-02 12:46:36,654 Spring executor 18 ERROR rgallegos 766x718x2 sv32jl 127.0.0.1 /rest/plugins/1.0/ [atlassian.activeobjects.osgi.ActiveObjectsServiceFactory] Could not find any active objects configurations for bundle com.zagile.jira.plugin.zteamworkjira.
Did you define an 'ao' module descriptor in your plugin?
Try adding this in your atlassian-plugin.xml file: <ao key='some-key' />
com.atlassian.plugin.PluginException: com.atlassian.activeobjects.osgi.NoServicesFoundException: Was expecting one service reference for interface <com.atlassian.activeobjects.config.ActiveObjectsConfiguration> and filter <(com.atlassian.plugin.key=com.zagile.jira.plugin.zteamworkjira)>. Got null ! You should check whether an ActiveObjectsPluginException was thrown at startup. It will give you more information about potential errors in the <ao> module in your atlassian-plugin.xml.
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.getConfiguration(ActiveObjectsServiceFactory.java:151)

The problem is maybe that I don't know how to use the ao object, all the tutorials and pages say that you just need to use with create, find and all the methods, but where? when? how JIRA will initilize that ao object, which class should create it? That is my major concern. Please help.

2 answers

0 votes
Ignat
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 4, 2013

Hi Raul.

It looks like there is a tutorial for ActiveObjects https://developer.atlassian.com/display/DOCS/Getting+Started+with+Active+Objects

You can find a correspondent reference to the Mercurial repository there: Bitbucket serves a pulbic Mercurial repository containing the tutorial's code. To clone the repository, issue the following command:

hg clone ssh://hg@bitbucket.org/atlassian_tutorial/ao-tutorial

--

Cheers, Ignat.

0 votes
Raul Gallegos August 1, 2013

or maybe you could direct me to a jira plugin code ready to test, I was trying with https://bitbucket.org/mdoar/practical-jira-plugins - aoexample, but I was giving me some maven problems. Thank you

Suggest an answer

Log in or Sign up to answer