I have my mail handler plugin which works fine in Jira 7.13.18, but when I try to start Jira 8.13.2 with that, plugin doesn't start. The reason is:
Error creating bean with name 'sendMessageService': Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.velocity.VelocityManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value="")}
No qualifying bean of type 'com.atlassian.velocity.VelocityManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value="")}
Here is code of sendMessageService:
@Named
public class SendMessageService {
private final MailServerManager mailServerManager;
private final MailQueue mailQueue;
private final VelocityManager velocityManager;
@Inject
public SendMessageService(@ComponentImport MailServerManager mailServerManager,
@ComponentImport MailQueue mailQueue,
@ComponentImport VelocityManager velocityManager) {
this.mailServerManager = mailServerManager;
this.mailQueue = mailQueue;
this.velocityManager = velocityManager;
}
What is the problem with VelocityManager? And why it is not defined in the Spring Context in new version of Jira?