Description of problem: REST operations that retrieve Task instances will fail when forced to use the JSON format (ACCEPT header). How reproducible: Always. Steps to Reproduce: 1. Call http://server:<port>/business-central/rest/task/<taskId> (GET, with ACCEPT header that specifies the application/json format) Actual results: An error will be thrown on the server side when the server instance tries to convert the (Jaxb)Task instance to JSON. Expected results: No error will occur and the client will receive a correctly filled-in and correctly (JSON) formatted instance of the (Jaxb)Task.
JSON has been chosen as the default format to be used with business-central.
The fix for this issue is available, I am simply waiting for the appropriate flags in order to push it to the 6.0.x branch.
Fixed. Commits: 6.0.x: https://github.com/droolsjbpm/jbpm/commit/4c3d9b58 https://github.com/droolsjbpm/jbpm/commit/9aae8584 master: https://github.com/droolsjbpm/jbpm/commit/87cdf298
Created attachment 872427 [details] JSON_stack_trace Marco, there's still an exception present in the server log. There's a getter conflict between org.jbpm.services.task.impl.model.xml.JaxbTask#getArchived(0 params) and org.jbpm.services.task.impl.model.xml.JaxbTask#isArchived(0 params). Please see JSON_stack_trace.log for the whole stack-trace.
If I missed something then please put the issue back to ON_QA. Thanks!
Finally *really* fixed. Tested this very thoroughly. Commits: 6.0.x: https://github.com/droolsjbpm/jbpm/commit/db09bc70 https://github.com/droolsjbpm/jbpm/commit/6cfadd09 https://github.com/droolsjbpm/droolsjbpm-integration/commit/217c660e master: https://github.com/droolsjbpm/jbpm/commit/1dcc4543 https://github.com/droolsjbpm/jbpm/commit/2decaa0e https://github.com/droolsjbpm/droolsjbpm-integration/commit/89383199
Ticket cherry-picked into 6.0.1.CR1. Commits: c66f85ebd2e63bea310fad67d4b3418a22b3ece8 68e2cd4526495a4431b4b66fb48f5d6bde6a5006 995a9d1bbaef260da385420a65a55383680c2443
Okay, with these commits I ended up just deleting the "isArchived()" method so that the above message isn't possible. I ran the GetTaskJSONTest and it passed. However, given that this is try #3, and I've already been wrong twice, I'm not saying anything else. :) Commits: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/a8e5385a https://github.com/droolsjbpm/jbpm/commit/aa5b4112 https://github.com/droolsjbpm/jbpm/commit/73729bf1 master: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/b4fe4c67 https://github.com/droolsjbpm/jbpm/commit/cfe190e8
Verified in BPMS 6.0.2.ER2
Hi Marco, the fix works well on Oracle JDK and OpenJDK but I see some problems on IBM JDK. I rather open this issue once more than to file another one for the same problem but on IBM JDK. I get the following exception on IBM JDK 1.6 and 1.7 for the same reproducer [comment 10 https://bugzilla.redhat.com/show_bug.cgi?id=1065314#c10] : org.codehaus.jackson.map.JsonMappingException: Conflicting getter definitions for property "archived": org.jbpm.services.task.impl.model.TaskImpl#getArchived(0 params) vs org.jbpm.services.task.impl.model.TaskImpl#isArchived(0 params) (through reference chain: org.jbpm.services.task.impl.model.xml.JaxbTask["task"]) at org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:740) at org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:344) at org.codehaus.jackson.map.ser.impl.PropertySerializerMap.findAndAddSerializer(PropertySerializerMap.java:39) I am going to attach the full message I received with the stacktrace. Thanks
Created attachment 895412 [details] Received message with exception on IBM JDK
Thanks for the thorough testing! Fixed. I haven't run integration tests on this, but I've fixed the cause of the problem: there were 2 "getter" methods: getArchived() and isArchived(). I've removed the getArchived() method everywhere. Commits: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/ff773e69 https://github.com/droolsjbpm/jbpm/commit/f398cf50 master: https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/4f486448 https://github.com/droolsjbpm/jbpm/commit/d833cd2e
Test passed. Setting to VERIFIED (on BPMS 6.0.2.ER3).