Bug 1065314
| Summary: | Unable to retrieve a JSON formatted Task instance via the REST API | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Marco Rietveld <mrietvel> | ||||||
| Component: | Business Central | Assignee: | Marco Rietveld <mrietvel> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ivo Bek <ibek> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 6.0.1 | CC: | abhumbe, kverlaen, mbaluch, mbiarnes, rrajasek, rzhang, smcgowan, vigoyal | ||||||
| Target Milestone: | ER3 | ||||||||
| Target Release: | 6.0.2 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: |
Latest summary:
REST operations that retrieved Task instances would fail when forced to use the JSON format (ACCEPT header). There was a server side error thrown when the server instance tried to convert the (JAXB) Task instance to JSON. The workaround for this issue was to use XML instead of JSON (by setting it in the ACCEPT header).
This issue has now been fixed in the latest version of the product and the workaround is no longer required.
Old Summary:
REST operations that retrieve Task instances will fail when forced to use the JSON format (ACCEPT header). There is a server side error thrown when the server instance tries to convert the (JAXB) Task instance to JSON. To workaround this issue, please use XML instead of JSON (by setting it i the ACCEPT header).
Cause:
Consequence:
Fix:
Result:
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-08-06 19:50:37 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marco Rietveld
2014-02-14 10:46:58 UTC
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). |