Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet filter not able to instantiate JIRA service

Subhajit Bhuiya June 7, 2018

I have written a REST service for JIRA and want user to redirect to login page if the user is not authenticated. I have written a servlet filter for it. Now I want to access LoginUriProvider from the Servlet filter like this

 

LoginUriProvider loginUriProvider = ComponentAccessor.getComponent(LoginUriProvider.class);

 

But I get null pointer exception.

I get the same issue when I execute the statement from my REST module.

 

But in Servlet module I can initialize via constructor.

 

Now my question is how to initialize the JIRA classes or service from REST module and Servlet filter

1 answer

0 votes
Subhajit Bhuiya June 7, 2018

This is now working with @Scanned and @JiraImport annotation

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events