Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

exception while adding text searcher in custom field

Vedant Kulkarni
Contributor
November 7, 2017

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>()

plugin.xml

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

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<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>
</plugin-info>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="userCF"/>
<!-- add our web resources -->
<web-resource key="userCF-resources" name="userCF Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<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"/>
<context>userCF</context>
</web-resource>


<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-type>

<customfield-searcher key="readonly-user-searcher" name="Read Only User Searcher"
class="com.atlassian.jira.issue.customfields.searchers.TextSearcher">
<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"/>
</customfield-searcher>


</atlassian-plugin>

Do I need to create separate text searcher class?

1 answer

0 votes
Gregor Kasmann_Actonic
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 7, 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
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events