Dear Community,
I am new in developing Add-Ons and at the moment, I am trying to use Active Objects but unfortunately, it doesn't work. Can you please help me?
First of all: I am using Jira SDK with the following settings:
What have I done so far?
I have my Add-On Skeleton which works fine so far. I have a webwork which I want to use to enter data. That works fine. A HTML formular appears and I am able to hit "save". "Save" goes to my Java class which accept all the HTML formular fields. Furthermore I have an active objects class with the definition my of "table":
package de.idsimaging.com.jira.activeobjects;
import net.java.ao.Entity;
public interface MyOwnTable extends Entity
{
String getName();
String setName(String name);
String getDescription();
String setDescription(String description);
}
No compiler errors so far and the "table" also appears in database and in "Plugin data storage" section in JIRA.
Now, it's time to use it but that's the point where i struggled with and where I ask for your help. I've read several tutorials but either i don't understand or the tutorials are out of date. I've read the following points, unknown if they true or false:
I need to import the right package
import com.atlassian.activeobjects.external.ActiveObjects;
Result: Works. No errors.
I need to extend my constructor of my related Java class by adding:
public MyOwnTableAction(@ComponentImport final ActiveObjects ao)
{
obj_ProjectManager = getProjectManager();
//this.ao = ao;
}
Result: It doesn't work. Error file says "org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name..." In that case, I've read, that I have to import an "component-import" to my plugin.xml ->
I need to add a component-import to my plugin.xml
<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>
Result: It doesn't work. Error appears: "atlassian-plugin.xml contains a definition of component-import. This is not allowed when Atlassian-Plugin-Key is set." No idea of what to do.
I need to add an dependency to my pom.xml
<dependency>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
Result: Done. No errors. But I also have read that I don't have to do it when I use Atlassian Spring Scanner? Not sure what that means but I have some active spring scanner settings in my pom.xml.
Can you please help me to find the absolut minimalist of how to use a very simple Active Objects in an Add-On? Thank you very much in advance.
Kind regards!
Hi Pedro,
yes. I always get the error "org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name..." with or without the component-import setting.
Kind regards,
Manuel
Hi there,
Have you tried to remove the component-import from the plugin.xml ?
Best regards,
Pedro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.