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

Getting NoSuchMethod Exception when trying to update an issue

I've got this piece of code where I'm trying to update the due date field of an issue on IssueEvent

public void onIssueEvent(IssueEvent issueEvent) {
Long eventTypeId = issueEvent.getEventTypeId();
 MutableIssue issue = (MutableIssue)issueEvent.getIssue();
 GregorianCalendar calendar=new GregorianCalendar(2017,7,13,1,13,13);
 issue.setDueDate(new Timestamp(calendar.getTimeInMillis()));
 IssueService issueService=ComponentAccessor.getIssueService();
System.out.println("Issue service is not null");
 User user=ComponentAccessor.getJiraAuthenticationContext().getUser().getDirectoryUser();
if (user!=null)
System.out.println("The logged in user is "+user.getName());
 IssueInputParameters inputParameters=issueService.newIssueInputParameters();
 IssueService.UpdateValidationResult validationResult=issueService.validateUpdate(user,issue.getId(),inputParameters);
 System.out.println("Issue type:"+issue.getIssueTypeObject().getName());

For some reason, I get NoSuchMethod exception when execution reaches to the following line:

IssueService.UpdateValidationResult validationResult=issueService.validateUpdate(user,issue.getId(),inputParameters);

I've also tried to use IssueManager to update issue but I get the same exception for "IssueManager.updateIssue" method. What am I doing wrong?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

You are passing the wrong argument to valiDateUpdate. You should be passing an ApplicationUser object instead of the old User object. Try passing ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() instead.

But that validateUpdate method does not accept ApplicationUser argument, it accepts only User. And even if it accepted, what relation can it have to the NoSuchMethod exception?

What version of JIRA are you on?

That's pretty strange, then how can I compile and and upload it to the jira? The two system.out.prints print successfully.

Maybe you have a different version in your pom? Or your IDE playing with you? wink 

Yes, Jobin, you are absolutely right. In the pom, it is 


In fact I downloaded the sample listener plugin from Bitbucket and tried to run it against 7.2.6 I did this because with my own plugin I was getting "Plugin not in valid state..." error. It seems the spring version needs to be set correctly. In the tutorial, for the spring-framework dependency, it says "use the version used by your UPM". Do you happen to know where I can see what spring-framework version the UPM uses, and where I can find that version. Thanks a lot ahead.

AUG Leaders

Atlassian Community Events