Bug 1227470

Summary: SerializationException by using List type as variable in Human Task in BPM Suite 6.1
Product: [Retired] JBoss BPMS Platform 6 Reporter: Amana <ajuricic>
Component: jBPM CoreAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.1.0CC: agiertli, ajuricic, kverlaen
Target Milestone: CR1   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:13:35 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 Flags
projects
none
updated jaxbList-kjar project none

Description Amana 2015-06-02 17:51:07 UTC
Description of problem:

A SerializationException is experienced when using a List type in a human task for BPM Suite 6.1.0. It is similar to the error reported in [1]. However, it is initially related to the model class generated as follows:

_____________________________________________________________________
org.kie.services.client.serialization.SerializationException: Unable to marshall JaxbCommandsRequest instance.
...
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.SAXException2: class com.capitalone.Answer nor any of its super class is known to this context.

-> full error here: http://pastebin.test.redhat.com/287380
_____________________________________________________________________


After adding the class as a extra jaxb class, the error has changed:

addExtraJaxbClasses(new Class[] { com.sample.Answer.class })

_____________________________________________________________________
org.kie.remote.client.api.exception.RemoteApiException: IllegalStateException thrown with message 'Could not unmarshall user-defined class instance parameter of type 'jaxbListWrapper'':
java.lang.IllegalStateException: Could not unmarshall user-defined class instance parameter of type 'jaxbListWrapper'

-> full error here: http://pastebin.test.redhat.com/287381
_____________________________________________________________________

It should be fixed in 6.1.

[1] https://developer.jboss.org/thread/249814


Version-Release number of selected component (if applicable):

BPM Suite 6.1


How reproducible:

Always


Steps to Reproduce:

1. attached you can find projects.zip; download and unzip it;
2. jaxblist-model: build it and add it as a Artifact Repository in bc;
3. jaxblist-kjar: build this jar and upload it to bc. Create a deployment unit using this kjar ( you will have to fill out KieBase and KieSession as KieBase and KieSession respectively).  
4. example-rest-client: Import it to JBDS and use the tests here to start a process then attempt to complete a task, that is where the error will occur;
5. the user used by the HT is bpmsAdmin;


Actual results:

As the sample has included in CompleteTask61 as follows:

.addDeploymentId(deploymentId).addExtraJaxbClasses(new Class[] { com.sample.Answer.class })

You will see the jaxbListWrapper http://pastebin.test.redhat.com/287381.

But please also test it without this extra jaxb class and you will see 

So you will see http://pastebin.test.redhat.com/287380.


Expected results:

it should work without adding those extra jaxb classes.


Additional info:

Comment 1 Amana 2015-06-02 17:51:55 UTC
Created attachment 1033948 [details]
projects

Comment 3 Maciej Swiderski 2015-06-02 18:06:25 UTC
looks like the jaxblist-model is not added as jaxblist-kjar dependency so it won't be added to jab context on server side.

Could you please add it there (in pom.xml) and redeploy with that you should be able to unmarshal that class instance properly.

Comment 4 Amana 2015-06-02 18:54:52 UTC
I just tried it and got the same two issues.

Comment 5 Maciej Swiderski 2015-06-05 12:47:44 UTC
Amana,

take a look at attached jaxbList-kjar project that contains kie-deployment-descriptor.xml next to kmodule.xml (inside META-INF) that defines one extra remoteable class - JaxbListWrapper. In addition pom.xml defines dependency on the model jar.

With these two changes I was able to run successfully the two test cases for remote client. Could you please give it a try?

Anyway, consider this as workaround as that JaxbListWrapper should be available out of the box for JaxbContext so this still needs to be fixed.

Comment 6 Maciej Swiderski 2015-06-05 12:48:23 UTC
Created attachment 1035257 [details]
updated jaxbList-kjar project

Comment 7 Maciej Swiderski 2015-09-09 10:06:55 UTC
assigning to Marco as it might have been already fixed

Comment 8 Marco Rietveld 2015-11-06 01:55:45 UTC
Fixed with these changes (among others, but these are the primary ones):

https://github.com/droolsjbpm/droolsjbpm-integration/commit/78b5d38f
https://github.com/droolsjbpm/droolsjbpm-integration/commit/7da9f9b4

These commits are also available on 6.3.x

Comment 9 Ivo Bek 2015-11-20 12:35:58 UTC
Verified in BPM Suite 6.2.0.CR1.

Note: the kjar reproducer does not depend on the model, so it's not aware of the Answer, hence the answers list in the process contains only an element.