JIRA custom field of type Version

gil February 3, 2018

Hello all - need some help to develop a JIRA custom field of type VersionCFType (version type).  I have the following class, and compile OK:

 

public class JiraCustomField extends VersionCFType {

public JiraCustomField(PermissionManager pm, JiraAuthenticationContext jac, VersionManager vm, CustomFieldValuePersister cfvp,
GenericConfigManager gcm, VersionHelperBean vhb, JiraBaseUrls jbu) {

super(pm, jac, vm, cfvp, gcm, vhb, jbu);
}

}

 

But when the plugin is deployed to JIRA, there's an error message:

com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.jira.plugin.customfield.example.JiraCustomField': Unsatisfied dependency expressed through constructor argument with index 5 of type [com.atlassian.jira.issue.fields.util.VersionHelperBean]: : No unique bean of type [com.atlassian.jira.issue.fields.util.VersionHelperBean] is defined: Unsatisfied dependency of type [class com.atlassian.jira.issue.fields.util.VersionHelperBean]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.jira.issue.fields.util.VersionHelperBean] is defined: Unsatisfied dependency of type [class com.atlassian.jira.issue.fields.util.VersionHelperBean]: expected at least 1 matching bean
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

...

 

What is missing?  Thanks.

1 answer

0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2018

Hi Gil,

This error looks similar to the one in Solved:How can i make custom fields in JIRA 7.x?.

Here is the solution from Rusi Popov:

 

Checking the links again I see that my comments disappeared. Trying to recover, the main idea is that the Atlassian SDK generates the  maven POM.xm with  Atlassian-Plugin-Key which has a special treatment in JIRA to skip some processing on deployment. It leads to UnsatisfiedDependencyException

Remove it from pom.xml/build/plugins/plugin/instructions

Also please take a look at the knowledge base article Atlassian Spring Scanner and NoSuchBeanDefinitionException.

Hopefully that helps.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer