I am writint a service which extends AbstractService class.The purpose of this service is to send emails..
but when i try to add this service i get this error..
" Exception loading class: [Class 'com..mail.ArchiveEmailSenderService..is loadable from OSGi but no enabled plugins could autowire an instance" .
In my constructor-
public ArchiveEmailSenderService(ProjectManager projectManager, IssueManager issueManager, IssueIndexManager issueIndexManager, Locale locale, WebResourceManager resourceManager,
I18nHelper.BeanFactory beanFactory,ProjectStatistics projectStatistics) {
this.projectManager = projectManager;
this.searchProvider = ComponentManager.getInstance().getSearchProvider();
this.issueManager = issueManager;
this.issueIndexManager = issueIndexManager;
this.locale = locale;
this.resourceManager = resourceManager;
this.applicationProperties = ComponentAccessor.getApplicationProperties();
this.beanFactory = beanFactory;
}
ProjectStatistics projectStatistics - is my own class which i have used to inject via component module.(Pico injection..)
This usually happens if the ProjectStatistics has a constructor which cannot be used.
Make sure ProjectStatistics is declared as a bean (component) in your atlassian-plugin.xml and that its constructor is usable.
Yes i have used in atlassian-plugin.xml and it was working fine until i added addional parameters in the constructor..
component key="archiveProject_component" class="com.mail.ProjectStatisticsImpl" public="true"> <description>Provides project statistics.</description> <interface>com.mail.ProjectStatistics</interface> </component>
I also blocked/commented this component import code and tried but i still get the same error..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There you go. Some of the added parameters are not good (who inject your Locale ? is the usual Locale or another service? also not sure about the I18nHelper.BeanFactory) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.