Update customfields throw REsT API on remote jira instance

UpdateCustomField.PNG

Hello

Actually we are in production from 2011 on Jira version v4.1.2#531 on a Windows 2008 Server and the MSSQLServer 2008 contents about 120000 issues. In a client side (DMZ zone) we've another instance of jira v4.1.2 and we sent some data from production to client side with the purpose to inform the customers and receive from them the issues concerning new developments or bugs on our product.
Now, we try to migrate the two Jira instances (production and customer side) to version v7.3.0#73011-sha1:3c73d0e on Windows 2012 R2 Server and db on MS SQLServer 2014 using JRJC v2.0.0-m25 and JIRA REST API. We've find a lot of difficulties and modifications to do in our plugins, services and listeners created by us. One of blocking situation is customfiels updates using REST API from production to customer side. The customfiels concerned are of type "Admin Editable Date Field", and "Admin Editable and View Date field" and this types ahas been created by us in a jira plugin.
We try to update directly by Atlassian REST API Browser but we find the same resut that our jira service java code that's "500 Internal Server ERROR".
When we created the issue, there are not problems with these custom fields that are setted normally but the customfields are updated on production side end we need to update  in customer side but we found this problem. We've tried to send the request body "{"update":{"customfield_11381":[{"set":"19/Jun/17 17:01 PM"}]}}" or "{"fields":{"customfield_11381":"19/Jun/17 16:01 PM"}}" with the same result from customer server 500 Internal Error and log of customer side server is:

2017-06-19 17:12:41,497 http-nio-8080-exec-19 ERROR admin 1032x34369x1 16xgnvq 172.16.30.86 /rest/api/2/issue/JIRA-ERI-213 [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
 at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
 at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83)
 ... 3 filtered
 at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55)
 ... 1 filtered
 at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39)
 ... 15 filtered
 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
 ... 1 filtered
 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
 ... 36 filtered
 at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
 ... 53 filtered
 at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
 ... 1 filtered
 at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
 ... 16 filtered
 at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
 ... 20 filtered
 at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
 ... 10 filtered
 at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
 ... 4 filtered
 at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
 ... 29 filtered
 at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
 ... 28 filtered
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.String
 at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:43)
 at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:17)
 at com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler.updateIssueInputParameters(AbstractCustomFieldOperationsHandler.java:75)
 at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.finalizeIssueInputParams(IssueInputParametersAssembler.java:428)
 at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.buildForEdit(IssueInputParametersAssembler.java:230)
 at com.atlassian.jira.rest.v2.issue.UpdateIssueResource.editIssue(UpdateIssueResource.java:58)
 at com.atlassian.jira.rest.v2.issue.IssueResource.editIssue(IssueResource.java:752)
 ... 238 more

 

somebody has idea why this happens

1 answer

0 votes

Towards the end of your error message, there's a line that says your field is failing.  You are giving it a date, but the field appears to be trying to convert that to a text format.  Or possibly the other way around, but either way, the code in your field does not know how to handle the incoming data.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,755 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot