Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Jira Plugin development | Servlet issue

I am a student working on developing a plugin for JIRA, and have been having trouble getting my servlet to read my html file. So now I wonder which annotations are right to use ?, and what dependencies?. I don't get any error messages, I just can't open the index.vm page.

Would really appreciate if anyone could take a look at my code in the link that i  attach below, or just help me find the right person who is knowledgeable in this area.

Thanks for help :)

1 answer

1 accepted

0 votes
Answer accepted

Hi @Rickard Forslund , welcome on the community :)

When developing with Atlassian SDK, you need to add servlet description to atlassian-plugin.xml as described in this "how to" article

I don't know if it is what you need, but eventually get back to me so we can fix it :)

i Martin, first of all I want to thank you for taking your time to look at my problem, appreciated! I double checked my atlassian-plugin.xml file and it seems that I already have a description in my servlet.

<description key="sumalizer-servlet.description">The Sumalizer Servlet Plugin</description>


what could it be besides that?, any thoughts?

HI @Rickard Forslund , ok, I didn't check it precisely, I thought link leads to some "old" stackoverflow issue... sorry :).

I would adjust "variables" and "constructor" part to this:

    private final VelocityManager velocityManager;
    private final PageBuilderService pageBuilderService;
    private final IssueManager im;
    private final TemplateRenderer tr;

    private static final Logger log = LoggerFactory.getLogger(

    public SumalizerServlet(@ComponentImport VelocityManager velocityManager, 
@ComponentImport PageBuilderService pageBuilderService,
@ComponentImport IssueManager im,
@ComponentImport TemplateRenderer tr)
{ this.velocityManager = velocityManager; this.pageBuilderService = pageBuilderService; = im; = tr; }

where Autowired is from package 


I would also add some logging to doGet method. It is weird there are no errors in your atlassian-jira.log log file. 

Ye okay, I changed what you said, I already had dependency from all 100 attempts I already made hehe,  and now I actually get error messages again, saying.


Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.i3tex.plugin.servlet.SumalizerServlet': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.velocity.VelocityManager]: No qualifying bean of type [com.atlassian.velocity.VelocityManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value=)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.velocity.VelocityManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value=)}
... 2 filtered
at java.lang.reflect.Method.invoke(
at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(
at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(
at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(
at com.atlassian.plugin.servlet.descriptors.ServletModuleDescriptor.getModule(
at com.atlassian.plugin.servlet.DelegatingPluginServlet.<init>(
at com.atlassian.plugin.servlet.DefaultServletModuleManager$LazyLoadedServletReference.create(
at com.atlassian.plugin.servlet.DefaultServletModuleManager$LazyLoadedServletReference.create(
at com.atlassian.util.concurrent.LazyReference$
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(
... 233 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.velocity.VelocityManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value=)}

ye okay, i changed what you said, i already had the dependency from all the 100 attempts i already made hehe, and now i actualy getting some errors

And should the Class realy be annotated with @Component?



Hi @Rickard Forslund , yes, @Component and @Autowired annotations are correct... the question is why VelocityManager is not loaded... I will try to check it, but will need some time.

Okay sure, getin touch if you manage to solve anything Martin :)

I found one snippet of code we have and it uses 


Could you give it a try? You just need to replace VelocityManager with VelocityTemplatingEngine in constructor and class properties.

Snippet of code we use is:

private void addContextToParams(final Map<String, Object> templateParams) {
templateParams.put("baseUrl", applicationPropertiesFacade.getBaseUrl());
private String constructEmailBody(final String templatePath, final Map<String, Object> templateParams) {

return velocityTemplatingEngine.render(TemplateSources.fragment(getTemplateContent(templatePath)))

private String getTemplateContent(final String resourceName) {
try {
return IOUtils.toString(this.getClass().getResourceAsStream(resourceName), Charset.defaultCharset());
} catch (IOException e) {
// handle exception

 and resourceName is path to your template, in your case it should be


Hi again @Martin Bayer _MoroSystems_ s_r_o__ , I have been busy so haven't got time to answer you, I tried with your solution to the problem but didn't manage to get it to work , but got another tip that I could use webwork instead and that it would basicly work the same way, so i tried it out and  finally  got it to work! Now I try to make an api call to: jira/rest/api/2/search. but don't really know how to proceed, do you have some awesome tips or good approach to me? :), i also want to be able to pass in a jql string and get the information to a table on my webwork page,  Thanks for all your help

Hi @Rickard Forslund could you please create new topic and mention me eventually? We must try to have the Community portal as clean as possible.

But one small hint can be... In Java code, I would use SearchService ( instead of REST API, if there is no reason to use REST API.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events