Error when using Java 8 LocalDateTime in JSON format with the REST API in Intelligent Process Server 6

Solution In Progress - Updated -

Issue

When using LocalDateTime in a model object used to start a process in JSON format, for example:

{
  "myObj" : { "example.MyObj": { "time" : "2017-02-27T17:25:18.805" } }
}

We have the following exception:

ERROR [org.kie.server.remote.rest.jbpm.ProcessResource] (http-127.0.0.1:8180-1) Unexpected error during processing Error unmarshalling input: org.kie.server.api.marshalling.MarshallingException: Error unmarshalling input
        at org.kie.server.api.marshalling.json.JSONMarshaller.unmarshall(JSONMarshaller.java:201) [kie-server-api-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
       (...)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
Caused by: org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class java.time.LocalDateTime] from JSON String; no single-String constructor/factory method (through reference chain: example.MyObj["time"])
        at org.codehaus.jackson.map.deser.std.StdValueInstantiator._createFromStringFallbacks(StdValueInstantiator.java:379) [jackson-mapper-asl-1.9.9.redhat-4.jar:1.9.9.redhat-4]
        (...)
        ... 32 more

Is this possible to use LocalDateTime with Kie Server in BPM Suite 6?

Environment

  • Red Hat JBoss BPM Suite
    • 6.4
  • Java JDK 1.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content