Bug 1227470 - SerializationException by using List type as variable in Human Task in BPM Suite 6.1
Summary: SerializationException by using List type as variable in Human Task in BPM Su...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.2.0
Assignee: Shelly McGowan
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-02 17:51 UTC by Amana
Modified: 2020-03-27 20:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:13:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
projects (25.58 KB, application/zip)
2015-06-02 17:51 UTC, Amana
no flags Details
updated jaxbList-kjar project (27.91 KB, application/zip)
2015-06-05 12:48 UTC, Maciej Swiderski
no flags Details

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.


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