Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to register Jira service with Active Objects dependency

Pawel Owsnicki
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 20, 2024

I am using Jira Data Center 9.4.15. I want to create a service that uses Active Objects but I get the following error when trying to add the service:

  • Error adding service: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException: com.mot.jira.approvals.service.ReminderNotificationService has unsatisfied dependency 'interface com.atlassian.activeobjects.external.ActiveObjects' for constructor 'public com.mot.jira.approvals.service.ReminderNotificationService(com.atlassian.activeobjects.external.ActiveObjects)' from org.picocontainer.DefaultPicoContainer@76175521:1<[Immutable]:com.atlassian.jira.component.pico.CachingMutablePicoContainer@62cad7fe.

Using dependency injection with other beans works just fine. I get this error only with Active Objects.

My service class looks like this:

@Component
public class ReminderNotificationService extends AbstractService {
private final ActiveObjects activeObjects;


@Autowired
public ReminderNotificationService(ActiveObjects activeObjects) {
this.activeObjects = activeObjects;
}

@Override
public void run() { }

@Override
public ObjectConfiguration getObjectConfiguration() {
Map<String, ObjectConfigurationProperty> configProperties = new HashMap<>();
StringObjectDescription objectDescription = new StringObjectDescription("");

return new ObjectConfigurationImpl(configProperties, objectDescription);
}
}

 

atlassian-plugin.xml:

...

<component-import
key="activeObjects" interface="com.atlassian.activeobjects.external.ActiveObjects"/>


<ao key="ActiveObjectModule">
<description>The module configuring the Active Objects service used by this plugin</description>
[Entity declarations]
</ao>

...

 

pom.xml:

<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>

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

<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>

<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
</dependencies>

...

<properties>
<jira.version>9.4.15</jira.version>
<amps.version>8.2.2</amps.version>
<plugin.testrunner.version>2.0.2</plugin.testrunner.version>
<atlassian.spring.scanner.version>2.1.7</atlassian.spring.scanner.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

ComponentAccessor.getOSGiComponentInstanceOfType(ActiveObjects.class) also doesn't work, it returns null.

2 answers

1 vote
Kiên Nguyễn Trung
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2024

I had the same problem as you, wondering if you solved it? If it is resolved, can you tell me the solution?

0 votes
Rodrigo Martinez
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2025

Hi folks!

@Pawel Owsnicki@Kiên Nguyễn Trung or anyone reading this thread, do you have any updates on this?

I'm also after this answer for a customer who's trying to use Active Objects in Jira Scheduled Services.

 

Thanks in advance!

Kiên Nguyễn Trung
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2025

Hi @Rodrigo Martinez 

I'm not using Active Objects in Jira Scheduled Services. If you want create class to use Jira Scheduled Services, try implement logic function in your class extends AbstractService. I'm tried this way and it's success.

Hope you try success

 

Suggest an answer

Log in or Sign up to answer