Can't use ActiveObjects: No unique bean of type [com.atlassian.activeobjects.external.ActiveObjects] is defined

ConradR
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.
October 25, 2012

Hi,

I'm having trouble integrating ActiveObjects into my projects. I followed this guide:
https://developer.atlassian.com/display/AO/Getting+Started+with+Active+Objects

I tried different versions of the plugin (0.18.4, 0.19.7) and Jira (4.x, 5.1) but I cant install
the plugin because of the following exception:


[INFO] [talledLocalContainer] 2012-10-26 16:29:28,543 Spring executor 17 ERROR admin 989x291x1 ns79yg 127.0.0.1 /rest/plugins/1.0/ [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=XXX, config=osgibundle:/META-INF/spring/*.xml))
[INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://104.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : No unique bean of type [com.atlassian.activeobjects.external.ActiveObjects] is defined: Unsatisfied dependency of type [interface com.atlassian.activeobjects.external.ActiveObjects]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.activeobjects.external.ActiveObjects] is defined: Unsatisfied dependency of type [interface com.atlassian.activeobjects.external.ActiveObjects]: expected at least 1 matching bean
[INFO] [talledLocalContainer]     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
[INFO] [talledLocalContainer]     at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)

part of pom.xml:

<dependency>
   <groupId>com.atlassian.activeobjects</groupId>
   <artifactId>activeobjects-plugin</artifactId>
   <version>0.19.7</version>
   <scope>provided</scope>
</dependency>



part of atlassian-plugin.xml:

<ao key="ao-module">
        <description>The module configuring the Active Objects service used by this plugin</description>
        <entity>com.XXX.jira.ao.Todo</entity>
</ao>

<component key="tx-processor" name="Transactional Annotation Processor"
      class="com.atlassian.activeobjects.external.TransactionalAnnotationProcessor">
      <decription>Processes @Transactional annotations.</decription>
</component>

<component key="todo-service" name="Todo Service" class="com.XXX.jira.ao.TodoServiceImpl"/>






Any ideas what's wrong? Do i need a different version spring framework? Which one?

1 answer

1 accepted

8 votes
Answer accepted
Samuel Le Berrigaud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 25, 2012

Seems like your `atlassian-plugin.xml` is missing 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>

ConradR
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.
October 25, 2012

Hi Sam,

thanks! How could I miss that!?

codelab expert
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.
May 1, 2013

This answer helped me a lot :-)

Suggest an answer

Log in or Sign up to answer