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

SuhailM
Contributor
December 10, 2012

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
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2012

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

SuhailM
Contributor
December 11, 2012

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>

SuhailM
Contributor
December 11, 2012

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

SuhailM
Contributor
December 16, 2012

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);

Andrew Pechnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2012

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

UnsatisfiableDependenciesException

0 votes
SuhailM
Contributor
December 16, 2012

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);

0 votes
SuhailM
Contributor
December 11, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events