pweingardt/mylyn-gitlab

Can't Read the Due Date

Opened this issue · 3 comments

When I have a due date on any issues the repo will not sync any tasks because of the following error.

java.lang.RuntimeException: org.gitlab.api.GitlabAPIException
	at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:243)
	at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:197)
	at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:165)
	at org.gitlab.api.GitlabAPI.getIssues(GitlabAPI.java:2432)
	at org.gitlab.api.GitlabAPI.getIssues(GitlabAPI.java:2427)
	at de.weingardt.mylyn.gitlab.core.GitlabConnector.performQuery(GitlabConnector.java:121)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQuery(SynchronizeQueriesJob.java:304)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQueries(SynchronizeQueriesJob.java:261)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.run(SynchronizeQueriesJob.java:192)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeRepositoriesJob.updateQueries(SynchronizeRepositoriesJob.java:187)
	at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeRepositoriesJob.run(SynchronizeRepositoriesJob.java:142)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.gitlab.api.GitlabAPIException
	at org.gitlab.api.http.GitlabHTTPRequestor.handleAPIError(GitlabHTTPRequestor.java:408)
	at org.gitlab.api.http.GitlabHTTPRequestor.access$300(GitlabHTTPRequestor.java:38)
	at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:240)
	... 11 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class java.time.LocalDate] from String value ('2018-01-12'); no single-String constructor/factory method
 at [Source: java.io.StringReader@103beca9; line: 1, column: 54376] (through reference chain: Object[][40]->org.gitlab.api.models.GitlabIssue["due_date"])
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
	at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:843)
	at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:277)
	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:284)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1150)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:153)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:144)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:285)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:156)
	at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:17)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3562)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2578)
	at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:369)
	at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:38)
	at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:236)
	... 11 more

rompe commented

Same here, I can reproduce this with GitLab 11.3.0 and 11.4.5.

As soon as an issue has a due date set this error is raised, even if the due date is set for a closed issue and the query looks for open issues only.

I have the same problem

I also have the problem.
But from the source of the exception the error seems to lay in the API Wrapper