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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

818 views 2 19
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