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

NullPointerException thrown when trying to link issues in jira 4.2

Anandhi A July 11, 2012

Here is my code for IssueLinking in jira4.2...

ComponentManager com = ComponentManager.getInstance();

IssueLinkManager issueLinkManager = com.getIssueLinkManager();//returns null pointer exception

JiraAuthenticationContext authenticationContext = com.getJiraAuthenticationContext();

issueLinkManager.createIssueLink(Long.parseLong(issue.getId()),Long.parseLong(issue.getId()),10010L,1L,authenticationContext.getUser());

But, when i run this,i get NullPointerException at getIssueLinkManager()...

Please tell me how to solve this and link 2 existing issues...

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 11, 2012

Are you sure the null pointer is thrown there? That line looks okay to me! You can may be add some debug statements to be sure.

Anandhi A July 11, 2012

The exception is thrown in that line only...

I donot know how to proceed.Can u tell me how to perform IssueLinking and what are the necessary jar files for it.

Thank you in advance

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2014

If you are on the latest version of JIRA, use this instead: IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager()

TAGS
AUG Leaders

Atlassian Community Events