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 vote

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
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 yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

135 views 4 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