No qualifying bean of type 'com.atlassian.velocity.VelocityManager' available

aas December 15, 2020

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?

1 answer

0 votes
aas December 18, 2020

I try to do like described here https://bitbucket.org/atlassian/atlassian-spring-scanner/src/master/README.md 

And after adding 

<includeExclude>+com.atlassian.jira.plugins.issue.create.*</includeExclude>

in pom.xml plugin successfully run

Unfortunately I can't understand how it helps and why. As I understand VelocityManager was not defined in the Spring Context as bean, but when I add this parameter VelocityManager appeared in SpringContext

Suggest an answer

Log in or Sign up to answer