Unable to use a newer ActiveObject version in my plugin

Stefan Kohler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 1, 2012

I'm trying to upgrade my plugin to work with Confluence 4.x. As a part of that upgrade I also changed the version of ActiveObjects. I was using 0.11 and I upgraded to 0.19.1.1.

I noticed that there where some changes in version 0.18. and I checked all the information online about this. When using my plugin in Confluence 4.1.1 I get the next exception

com.atlassian.plugin.PluginException: com.atlassian.activeobjects.osgi.NoServicesFoundException: Was expecting at least one service reference for interface <com.atlassian.activeobjects.config.ActiveObjectsConfiguration> and filter <(com.atlassian.plugin.key=nl.stefankohler.confluence.confluence-twitter-plugin)>. Got null !
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.getConfiguration(ActiveObjectsServiceFactory.java:134)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.access$200(ActiveObjectsServiceFactory.java:40)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$LazyActiveObjectConfiguration.getDelegate(ActiveObjectsServiceFactory.java:238)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$LazyActiveObjectConfiguration.getDataSourceType(ActiveObjectsServiceFactory.java:189)
	at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.accept(AbstractActiveObjectsFactory.java:35)
	at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:37)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.createActiveObjects(ActiveObjectsServiceFactory.java:108)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.access$000(ActiveObjectsServiceFactory.java:40)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:54)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:50)
	at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:109)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.executeInTransaction(DelegatingActiveObjects.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)

Did I missed anything during the upgrade or are there things I should be aware of?

3 answers

1 accepted

0 votes
Answer accepted
Stefan Kohler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2012

After some more debugging I found out that I forgot to change one of the new reservered keywords, as suggested by David.

Plugin is now working with AO version 0.18.4 and higher!

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 2, 2012

Cool. Now that you're a world leader on upgrading AO in Confluence, perhaps you'd like to share your experiences in a blogpost :-)

1 vote
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 2, 2012

There were some important changes to the underlying AO library at version 0.18.x

Details here:
https://developer.atlassian.com/display/AO/AO+0.18.x+Upgrade+Guide

Note:

Active Objects 0.18.4 is the first AO version in this series that you should use. Previous versions had bugs that will cause problems.

There's no documentation on upgrading AO in Confluence though :(

Stefan Kohler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2012

Hi David,

I am aware of these changes and documentation as I mentioned in the question ;-)

I noticed that there where some changes in version 0.18. and I checked all the information online about this.

Upgrade guide to JIRA seemds ok, but nothing for Confluence indeed. This will become an issue I guess, there are already some plugin out there making use of Active Object. Atlassian did encourage this even, with the codegeist..

0 votes
Samuel Le Berrigaud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2012

Hey Stefan,

this should work. A few questions:

  1. Have you tried version 0.18.4?
  2. If yes does it have the same issue?
  3. Can you share your atlassian-plugin.xml?
Stefan Kohler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2012

It worked perfectly... I just missed one of the new reservered keywords, fixed that and it seems to be running OK now.

Are there any upgrade paths for those reserved keywords?

Julien Hoarau
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 2, 2012

You should use an UpgradeTask with the @IgnoreReserverdKeyword annotation. cf. https://studio.atlassian.com/browse/AO-278

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events