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

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,039 views 13 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot