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?
You should try to create your own CustomFieldSearcher implementation.
Something like:
public class MySearcher extends AbstractInitializationCustomFieldSearcher implements CustomFieldSearcher {
// implementation here
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.