-
Bug
-
Resolution: Done
-
Major
-
7.7.1.GA
-
User's environment is RHDM 7.7.1 Kie Server on EAP 7.2.6.
-
3
-
Release Notes
-
-
-
-
-
-
CR1
-
+
-
https://github.com/kiegroup/droolsjbpm-integration/commit/2f1f5a6a12b8430c7520cd6336c47ca484c317b2, https://github.com/kiegroup/droolsjbpm-integration/commit/3f01403ede93690cb8edc4254c1d7065960d914d, https://github.com/kiegroup/droolsjbpm-integration/commit/de254a50391b6e14a3f49363e779c81b616a9176, https://github.com/kiegroup/droolsjbpm-integration/commit/c1684108f415ea4eefb617835086b6e6eb368cd1
-
A user's decision service deployed on KIE server receives REST commands from client, MarshallingException due to class loading failure occurs during JSON unmarshalling before the commands are processed. I attached a simplified reproducer reproducer_02699633_1.zip expressing the issue, and the error message is like below:
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'com.example.reproducer.common.params.ContactParam' as a subtype of [simple type, class com.example.reproducer.common.base.IRuleParam]: no such class found at [Source: (String)"{ "lookup" : "ksession-rules", "commands" : [ { "insert" : { "object" : { "com.example.reproducer.common.base.Fact1": { "parameter" : { "@class" : "com.example.reproducer.common.params.ContactParam", "contactInfo" : 123456789 } } } } }, { "fire-all-rules" : "" } ]}"; line: 1, column: 185] (through reference chain: org.drools.core.command.runtime.BatchExecutionCommandImpl["commands"]->java.util.ArrayList[0]->org.drools.core.command.runtime.rule.InsertObjectCommand["object"]->com.example.reproducer.common.base.Fact1["parameter"])
For full error messages, see full_error_messages.txt in Attachment.
The user's decision service (kjar) uses classes in another module jar as a library. ContactParam class which is a sub type of IRuleParam interface is in the kjar and IRuleParam interface is in the module jar.
Also, @JsonTypeInfo(use = Id.CLASS) annotation is given to IRuleParam like below in order for JSON implementation to recognize a given class to Fact1.parameter as a sub type of IRuleParam.
@JsonTypeInfo(use = Id.CLASS) public interface IRuleParam { }
Both classes contained in the module jar and classes in the kjar should be loaded.
- incorporates
-
DROOLS-5534 MarshallingException occurs during REST request (JSON) unmarshalling in KIE server.
- Closed