Bug 1264541 - [GSS] (6.1.z) EventFactHandles are not deserialized correctly causing error "No enum constant org.drools.core.factmodel.traits.TraitTypeEnum.xxx"
[GSS] (6.1.z) EventFactHandles are not deserialized correctly causing error "...
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity high
: CR1
: ---
Assigned To: Mario Fusco
Karel Suta
:
Depends On: 1264525
Blocks: 1259378 1259382
  Show dependency treegraph
 
Reported: 2015-09-18 14:29 EDT by Gary Hu
Modified: 2016-05-18 08:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1264525
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-924 Major Resolved EventFactHandles are not deserialized correctly 2016-05-20 04:29 EDT

  None (edit)
Description Gary Hu 2015-09-18 14:29:10 EDT
+++ This bug was initially created as a clone of Bug #1264525 +++

The following code causes errors "No enum constant org.drools.core.factmodel.traits.TraitTypeEnum.xxx" 

 XStream xstream = BatchExecutionHelper.newXStreamMarshaller();
 ...
 ExecutionResults results = (ExecutionResults) xstream.fromXML(responseXml);

The root cause is explained in the jira https://issues.jboss.org/browse/DROOLS-924
"EventFactHandle overrides DefaultFactHandle's toExternalForm(), but it is not happening the same for the createFromExternalFormat() method. Moreover no code takes care of the 1st argument (the format version) of the serialized format so when deserializing it always instance a DefaultFactHandle even when it was serialized an event."

--- Additional comment from Mario Fusco on 2015-09-18 12:47:14 EDT ---

Fixed by https://github.com/droolsjbpm/drools/commit/59d791076204d28ed370bf83b7f21e9864b0a701 and https://github.com/droolsjbpm/jbpm/commit/c6fd866c5

--- Additional comment from JBoss Product and Program Management on 2015-09-18 12:50:08 EDT ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Mario Fusco 2015-09-24 04:04:58 EDT
Cherry-picked to 6.2.x branch with https://github.com/droolsjbpm/drools/commit/e95a7bb58 and https://github.com/droolsjbpm/jbpm/commit/3fda3dd73
Comment 4 Mario Fusco 2015-09-24 11:16:33 EDT
Also this commit is necessary https://github.com/droolsjbpm/drools/commit/b066c0b69d3b762913a0c724a917dfd71a4340b6
Comment 5 Karel Suta 2015-10-12 09:29:07 EDT
Verified in 6.1.4

Note You need to log in before you can comment on or make changes to this bug.