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:
Created attachment 1033948 [details] projects
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.
I just tried it and got the same two issues.
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.
Created attachment 1035257 [details] updated jaxbList-kjar project
assigning to Marco as it might have been already fixed
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
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.