[jboss-jira] [JBoss JIRA] (DROOLS-5534) MarshallingException occurs during REST request (JSON) unmarshalling in KIE server.

Toshiya Kobayashi (Jira) issues at jboss.org
Mon Jul 27 02:28:00 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Toshiya Kobayashi moved RHDM-1418 to DROOLS-5534:
-------------------------------------------------

              Project: Drools  (was: Red Hat Decision Manager)
                  Key: DROOLS-5534  (was: RHDM-1418)
             Workflow: GIT Pull Request workflow   (was: CDW with docs v1)
       Docs QE Status: NEW
          Component/s: kie server
                           (was: Kie-Server)
          Environment:     (was: User's environment is RHDM 7.7.1 Kie Server on EAP 7.2.6.)
    Affects Version/s: 7.40.0.Final
                           (was: 7.7.1.GA)
            QE Status: NEW


> MarshallingException occurs during REST request (JSON) unmarshalling in KIE server.
> -----------------------------------------------------------------------------------
>
>                 Key: DROOLS-5534
>                 URL: https://issues.redhat.com/browse/DROOLS-5534
>             Project: Drools
>          Issue Type: Bug
>          Components: kie server
>    Affects Versions: 7.40.0.Final
>            Reporter: Toshiya Kobayashi
>            Assignee: Toshiya Kobayashi
>            Priority: Major
>         Attachments: full_error_messages.txt, reproducer_02699633_1.zip
>
>
> 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:
> {noformat}
> 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"])
> {noformat}
> 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.
> {code:java}
> @JsonTypeInfo(use = Id.CLASS)
> public interface IRuleParam {
> }
> {code}
> Both classes contained in the module jar and classes in the kjar should be loaded.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list