exception while adding text searcher in custom field

Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate : No default constructor found; nested exception is java.lang.NoSuchMethodException: userCF.MyTextSearcher.<init>()


<?xml version="1.0" encoding="UTF-8"?>

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<vendor name="${project.organization.name}" url="${project.organization.url}"/>
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="userCF"/>
<!-- add our web resources -->
<web-resource key="userCF-resources" name="userCF Web Resources">
<resource type="download" name="userCF.css" location="/css/userCF.css"/>
<resource type="download" name="userCF.js" location="/js/userCF.js"/>
<resource type="download" name="images/" location="/images"/>

<customfield-type name="Read Only User CF" i18n-name-key="read-only-user-cf.name" key="read-only-user-cf" class="userCF.ReadOnlyUserCF">
<description key="read-only-user-cf.description">The Read Only User CF Plugin</description>
<resource name="view" type="velocity" location="/templates/customfields/read-only-user-cf/view.vm"/>
<resource name="edit" type="velocity" location="/templates/customfields/read-only-user-cf/edit.vm"/>

<customfield-searcher key="readonly-user-searcher" name="Read Only User Searcher"
<description key="admin.customfield.searcher.textsearcher.desc">Search for Read Only User using a free text search.</description>
<resource type="velocity" name="search" location="templates/plugins/fields/edit-searcher/search-basictext.vm"/>
<resource type="velocity" name="view" location="templates/plugins/fields/view-searcher/view-searcher-basictext.vm"/>
<valid-customfield-type package="${atlassian.plugin.key}.read-only-user-cf" key="readonly-user"/>


Do I need to create separate text searcher class?

1 answer

0 vote
Gregor Kasmann Community Champion Nov 07, 2017

You should try to create your own CustomFieldSearcher implementation.

Something like:

public class MySearcher extends AbstractInitializationCustomFieldSearcher implements CustomFieldSearcher {
// implementation here

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 Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

73 views 0 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