Error adding service: org.picocontainer.defaults.UnsatisfiableDependenciesException:

Hi,

I have used componenet import method to obtain functiionalities of a different plugin.But when i try to add the service i get this error.ITsn ot able to instantiate the object in the constructor..


at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getGreediestSatisifableConstructor(ConstructorInjectionComponentAdapter.java:138)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:193)
at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298)
at com.atlassian.jira.util.JiraUtils.loadComponent(JiraUtils.java:113)
at com.atlassian.jira.util.JiraUtils.loadComponent(JiraUtils.java:91)
at com.atlassian.jira.service.OfBizServiceConfigStore.addServiceConfig(OfBizServiceConfigStore.java:54)
at com.atlassian.jira.service.DefaultServiceManager.addService(DefaultServiceManager.java:211)
at com.atlassian.jira.service.DefaultServiceManager.addService(DefaultServiceManager.java:198)
at com.atlassian.jira.service.DefaultServiceManager.addService(DefaultServiceManager.java:184)
at com.atlassian.jira.web.action.admin.ViewServices.doExecute(ViewServices.java:143)
at webwork.action.ActionSupport.execute(ActionSupport.java:165)

3 answers

1 accepted

0 votes
Accepted answer

Is that a public component? You can only components which are declared public.

I have declared it public

<component key="archiveProject"
class="com.org.ArchiveProjectImpl"
public="true">
<description>Provides hello world services.</description>
<interface>com.org.ArchiveProject
</interface>
</component>

<pluginname> doesn't have any satisfiable constructors. Unsatisfiable dependencies:

Hi,

i was able to solve this by doing the following:

In atlassian-plugin.xml

<component-import key="archiveProject">
<interface>com.sap.jira.plugins.archiving.component.ArchiveProject
</interface>
</component-import>

Ans call this in a diff plugin by-

ComponentManager.getOSGiComponentInstanceOfType(ArchiveProject.class);

Have the same problem( All the componets are declared as public, but still have

UnsatisfiableDependenciesException

Is there any way to instantiate the object of other plugin if component-import doesnt work??

Add this in atlassian-plugin.xml

<component-import key="archiveProject">
<interface>com.org.ArchiveProject
</interface>
</component>

use this API to import the component instead of a constructor-

ComponentManager.getOSGiComponentInstanceOfType(ArchiveProject.class);

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

155 views 3 5
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