Bug 967759 - Solution with BendableScore cannot be deserialized using XStreamScoreConverter
Solution with BendableScore cannot be deserialized using XStreamScoreConverter
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: OptaPlanner (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER2
: 6.0.0
Assigned To: Geoffrey De Smet
Radovan Synek
Depends On:
  Show dependency treegraph
Reported: 2013-05-28 05:25 EDT by Radovan Synek
Modified: 2014-08-06 16:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:18:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Radovan Synek 2013-05-28 05:25:52 EDT
Exception saying "Cannot instantiate converter" occurs when trying to deserialize solution with bendable score, defined as follows:

@XStreamConverter(value = XStreamScoreConverter.class, types = {BendableScoreDefinition.class})
    private BendableScore score;

The problem is missing public no-arg constructor in BendableScoreDefinition class. There is already no-arg constructor but with private access modifier.
Comment 1 Radovan Synek 2013-05-28 06:19:52 EDT
Here is a pull request with the reproducer:
Comment 2 Geoffrey De Smet 2013-05-28 11:04:52 EDT
This fix will be in 6.0.0.Beta3: https://github.com/droolsjbpm/optaplanner/commit/63b1f7284fad495386ee9f34238dc3b69cb9bb98
Solution: use XStreamBendableScoreConverter instead
Comment 3 Geoffrey De Smet 2013-05-28 11:43:35 EDT
Regression testcase added too: http://github.com/droolsjbpm/optaplanner/commit/ae06b0b08
Comment 4 Radovan Synek 2013-09-09 06:48:58 EDT
Verified on BRMS 6.0.0.ER2

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