Unable to create a table in JIRA using Active Objects

Hi,

I am going through the Active Objects tutorial https://developer.atlassian.com/display/DOCS/Getting+Started+with+Active+Objects and developing a simple servlet plugin module in JIRA 5.1.8 using Active Objects.

I have added the following active objects dependency in pom.xml


<dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>0.19.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.4.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.collections</groupId>
            <artifactId>google-collections</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>

Following are the details of my atlassian-plugin.xml

<!-- import from the product container -->
    <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />
    
    <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.ao.tutorial.Todo</entity>
    </ao>

    <servlet name="Todo List & Add Servlet" class="com.ao.tutorial.TodoServlet" key="todo-list">
        <description>A servlet to add and list todos</description>
        <url-pattern>/todo/list</url-pattern>
    </servlet>

But I am hitting the following error upon compiling the code.

2013-08-26 12:07:43,430 http-2990-4 ERROR admin 727x337x1 ra3ihe 0:0:0:0:0:0:0:1 /plugins/servlet/todo/list [atlassian.activeobjects.osgi.ActiveObjectsServiceFactory] Could not find any active objects configurations for bundle org.apache.felix.framework.
Did you define an 'ao' module descriptor in your plugin?
Try adding this in your atlassian-plugin.xml file: <ao key='some-key' />
2013-08-26 12:07:43,437 http-2990-4 ERROR admin 727x337x1 ra3ihe 0:0:0:0:0:0:0:1 /plugins/servlet/todo/list [atlassian.plugin.servlet.DefaultServletModuleManager] Unable to create servlet
com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.ao.tutorial.TodoServlet': Invocation of init method failed; nested exception is 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=org.apache.felix.framework)>. 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.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)
	at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)
	at com.atlassian.plugin.servlet.DefaultServletModuleManager.getServlet(DefaultServletModuleManager.java:344)
	at com.atlassian.plugin.servlet.DefaultServletModuleManager.getServlet(DefaultServletModuleManager.java:147)
	at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:41)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)  <+14> (ApplicationFilterChain.java:290) (ApplicationFilterChain.java:206) (ChainedFilterStepRunner.java:78) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (XContentTypeOptionsNoSniffFilter.java:22) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (HeaderSanitisingFilter.java:44) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:39)  <+7> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (ContextFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter(ResourceFilter.java:59)  <+20> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (SiteMeshFilter.java:129) (SiteMeshFilter.java:77) (SitemeshPageFilter.java:124) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.remoteapps.modules.permissions.ApiScopingFilter.doFilter(ApiScopingFilter.java:60)  <+41> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (SecurityFilter.java:234) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (TrustedApplicationsFilter.java:98) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (BaseLoginFilter.java:169) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) (OAuthFilter.java:71) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ProfilingFilter.java:99) (JIRAProfilingFilter.java:19) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (UrlRewriteFilter.java:738) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (GzipFilter.java:80) (GzipFilter.java:51) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
	at com.atlassian.fastdev.AutoReloadFilter.doFilter(AutoReloadFilter.java:63)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.remoteapps.modules.oauth.OAuth2LOFilter.doFilter(OAuth2LOFilter.java:70)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.remoteapps.util.http.bigpipe.RequestIdSettingFilter.doFilter(RequestIdSettingFilter.java:22)  <+47> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (JWDSendRedirectFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ChainedFilterStepRunner.java:78) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:49) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ActiveRequestsFilter.java:346) (ActiveRequestsFilter.java:463) (ActiveRequestsFilter.java:173) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (JiraStartupChecklistFilter.java:75) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (MultiTenantServletFilter.java:91) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ChainedFilterStepRunner.java:78) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (StandardWrapperValve.java:233) (StandardContextValve.java:191) (StandardHostValve.java:128) (ErrorReportValve.java:102) (AccessLogValve.java:567) (StandardEngineValve.java:109) (CoyoteAdapter.java:293) (Http11Processor.java:849) (Http11Protocol.java:583) (JIoEndpoint.java:454)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.ao.tutorial.TodoServlet': Invocation of init method failed; nested exception is 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=org.apache.felix.framework)>. 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 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)  <+2> (DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:109)
	at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:32)
	at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java:99)
	at com.atlassian.plugin.servlet.descriptors.ServletModuleDescriptor.getModule(ServletModuleDescriptor.java:50)
	at com.atlassian.plugin.servlet.DelegatingPluginServlet.<init>(DelegatingPluginServlet.java:33)
	at com.atlassian.plugin.servlet.DefaultServletModuleManager$LazyLoadedServletReference.create(DefaultServletModuleManager.java:461)
	at com.atlassian.plugin.servlet.DefaultServletModuleManager$LazyLoadedServletReference.create(DefaultServletModuleManager.java:447)
	at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:326)
	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146)
	... 151 more
Caused by: 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=org.apache.felix.framework)>. 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)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.access$200(ActiveObjectsServiceFactory.java:43)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$LazyActiveObjectConfiguration.getDelegate(ActiveObjectsServiceFactory.java:255)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$LazyActiveObjectConfiguration.getDataSourceType(ActiveObjectsServiceFactory.java:206)
	at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.accept(AbstractActiveObjectsFactory.java:35)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.createActiveObjects(ActiveObjectsServiceFactory.java:125)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.access$000(ActiveObjectsServiceFactory.java:43)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:57)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:53)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects$MemoizingSupplier.get(DelegatingActiveObjects.java:144)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.find(DelegatingActiveObjects.java:71)
	at com.ao.tutorial.TodoServlet.afterPropertiesSet(TodoServlet.java:35)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	... 168 more
Caused by: com.atlassian.activeobjects.osgi.NoServicesFoundException: Was expecting one service reference for interface <com.atlassian.activeobjects.config.ActiveObjectsConfiguration> and filter <(com.atlassian.plugin.key=org.apache.felix.framework)>. 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.OsgiServiceUtilsImpl.getServiceReference(OsgiServiceUtilsImpl.java:50)
	at com.atlassian.activeobjects.osgi.OsgiServiceUtilsImpl.getService(OsgiServiceUtilsImpl.java:41)
	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.getConfiguration(ActiveObjectsServiceFactory.java:139)
	... 182 more

I am unable to rectify what is going wrong with this tutorial.

Any help would be much appreciated.

Regards,

Naren

2 answers

1 accepted

Check your POM. Did you uncomment jira-core api dependency? Its required for ao module.

<!-- Add dependency on jira-core if you want access to JIRA implementation 
			classes as well as the sanctioned API. -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

172 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you