UnsatisfiedDependencyException

Scott Kennedy February 3, 2016

I keep getting errors like this when I try to use my plugin:

[INFO] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.******************': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.stash.pull.PullRequestService]: : No unique bean of type [com.atlassian.stash.pull.PullRequestService] is defined: Unsatisfied dependency of type [interface com.atlassian.stash.pull.PullRequestService]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.stash.pull.PullRequestService] is defined: Unsatisfied dependency of type [interface com.atlassian.stash.pull.PullRequestService]: expected at least 1 matching bean

 

My atlassian-plugin.xml contains, among other things:

<component-import key="pullRequestService" interface="com.atlassian.stash.pull.PullRequestService"/>

 

There are 5 component-imports that simply aren't working.

 

What am I doing wrong?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 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.
February 3, 2016

Check out my latest blog about this error for JIRA plugins: http://www.j-tricks.com/tutorials/atlassian-spring-scanner-and-nosuchbeandefinitionexception

Same applies for Bitbucket server too. See more details at https://bitbucket.org/atlassian/atlassian-spring-scanner

Scott Kennedy February 4, 2016

Thanks.

 

Jens Kisters //SeibertSolutions
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.
November 13, 2017

Weird! i created a new custom field in a new plugin,

based on an customfield from annother plugin.

Neither had the @Injection Annotation

On friday the Field worked just fine,

on Monday i start up the atlas-run after only changing some Javascript and i get the UnsatisfiedDependencyException.

I wonder why.

But Thanks for your article, at least i found out how to fix it relatively quick :)

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.
November 13, 2017

@Jens Kisters //SeibertSolutionsNot sure why it stopped working without any changes to the code! Anyways, glad you were able to fix it fast :)

TAGS
AUG Leaders

Atlassian Community Events