Forums

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

Why do I get a NullPointerException when I try to create a worklog.

Maja Stach June 18, 2013

I'm writing a plugin that uses an excel file to create a worklog.

however right now I don't even get my plugin to write any data, even if I add static input parameters.

this is hoe I try to create the worklog:

public void writeWorklog(ExcelRowTo ex) throws ParseException{
		Issue issue = manager.getIssueObject(ex.getClarityTaskId());	
		WorklogInputParameters params = WorklogInputParametersImpl.timeSpent(ex.getSpentHours().toString()).startDate(stringToDate(ex.getOccurredDate())).issue(issue).build();
		WorklogResult result = ws.validateCreate(jsc, params);
		ws.createAndRetainRemainingEstimate(jsc, result, true);

	}

and for some Reason I get a NullPointer.
I would expect a validation-whatever-error or something like that and really can't explain the nullpointer.

Any ideas?
help greatly appreciated.

Good day =)

1 answer

0 votes
Carsten A.
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.
June 23, 2013

Could you at least provide at which location/position in the provided code the NullPointer is thrown?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events