Getting MethodInvocationException exception when we try to access Timesheet Subscriptions

Issue #589 resolved
Reetesh Kumar created an issue

Hi Andriy,

We are getting below error in JIRA log when we tried to access Add-ons > click on "Timesheet Subscriptions" under "Time Tracking"

2015-01-15 05:51:24,582 http-bio-8080-exec-6 ERROR rkum66 351x6140x1 1fj5nl 14.140.116.145,172.18.13.241,172.18.14.164 /secure/SubscriptionsConfiguration!default.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException java.lang.NullPointerException

Why this exception is occurring? Can we remove this exception?

We are also trying to test the Subscriptions but we are not able to get any mail. Can we schedule a call today to test this scenario between 1:00 PM to 4:00 PM IST today? Please schedule this as early as possible. This is also blocking issue for us.

Thanks, Reetesh

Comments (11)

  1. Andriy Zhdanov

    Hi Reetesh,

    Could you please check in menu Issues - Timesheet Subscriptions, select a subscription and see Preview. Let me know if it works, or there is better exception.

    Thank you.

  2. Reetesh Kumar reporter

    Hi Andriy,

    We will try the workaround you suggested above. But before that, we saw below warn/error in JIRA log. This may help you to resolve the issue. In the log we found below users msharma9 and rkumar66.

    1. msharma9 - This is the OLD user name of user Madhu Sharma. This has been renamed to mshar5 now. That is the user name 'msharma9' is renamed with 'mshar5'

    2. rkumar66 - This is the OLD user name of user "Reetesh Kumar". This has been renamed to 'rkum66' now. That is the user name 'rkumar66' is renamed with 'rkum66'

    2015-01-15 08:00:00,009 atlassian-scheduler-quartz1.clustered_Worker-2 WARN ServiceRunner [timesheet.plugin.job.TimesheetJob] User not found: msharma9 2015-01-15 08:00:00,018 atlassian-scheduler-quartz1.clustered_Worker-3 WARN ServiceRunner [timesheet.plugin.job.TimesheetJob] User not found: rkumar66 2015-01-15 08:00:00,039 atlassian-scheduler-quartz1.clustered_Worker-1 WARN ServiceRunner [timesheet.plugin.job.TimesheetJob] User not found: rkumar66 2015-01-15 08:00:00,265 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR c_pcapi1 [org.quartz.core.JobRunShell] Job TIMESHEET_SUBSCRIPTION.TIMESHEET_SUBSCRIPTION threw an unhandled Exception: java.lang.IllegalArgumentException: 'To' is a required field at com.atlassian.mail.Email.<init>(Email.java:51) at jira.timesheet.plugin.job.TimesheetJob.queueEmail(TimesheetJob.java:108) at jira.timesheet.plugin.job.TimesheetJob.execute(TimesheetJob.java:51) at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:62) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) 2015-01-15 08:00:00,266 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR c_pcapi1 [org.quartz.core.ErrorLogger] Job (TIMESHEET_SUBSCRIPTION.TIMESHEET_SUBSCRIPTION threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.IllegalArgumentException: 'To' is a required field] at org.quartz.core.JobRunShell.run(JobRunShell.java:234) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: java.lang.IllegalArgumentException: 'To' is a required field at com.atlassian.mail.Email.<init>(Email.java:51) at jira.timesheet.plugin.job.TimesheetJob.queueEmail(TimesheetJob.java:108) at jira.timesheet.plugin.job.TimesheetJob.execute(TimesheetJob.java:51) at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:62) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) ... 1 more

  3. Andriy Zhdanov

    Hi Reetesh,

    Thank you for providing error details. Could you please try updated jira-timesheet-plugin-2.8.2.6-JRA-32510.jar from downloads tab, and let me know if it solves the problem?

    Note, you need to install plugin again.

    Thank you

  4. Reetesh Kumar reporter

    Thanks Andriy. We have downloaded this updated plugin and we are installing this now. We will let you know if we will face any other issue.

  5. Reetesh Kumar reporter

    Hi Andriy,

    We have installed this updated plugin. We are still getting the same error in JIRA log. Users are still not able to receive the mails. We Scheduled a subscription as shown in the screenshot TimesheetSubscription-Schedule.png. Here we scheduled it for "once per day" at 10:00 A.M. Greenwich Mean Time. Ideally it should send mails to the users at 10:00 A.M. Greenwich Mean Time in First group as First group is selected for "CC Users in Group" and "Remind Users in Group". But no body is getting any mails. We are not facing any error during these activities. Please look into this issue. Suggest us the correct testing way, if we are performing any wrong steps.

    Thanks, Reetesh

  6. Andriy Zhdanov

    Hi Reetesh,

    Looks like some users in "CC Users in Group" or "Remind Users in Group" do not have email address. Though it's weird nobody else gets email. Do you receive other email from JIRA? Because in log I can see that job has triggered at 10:00 am, but got problems with some users that do not have email address, though others should have received email. At least the one who subscribed to the report.

    I've added fix for users without email address, please try new updated jira-timesheet-plugin-2.8.2.6-JRA-32510.jar from downloads tab again.

    Note, I can't reproduce NullPointerException yet, so this update does not include any fix for it.

    Thank you.

  7. Log in to comment