Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4134

Handle the case where a class is not found in JSONMarshaller$CustomObjectDeserializer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.13.0.GA
    • 7.11.1.GA
    • Kie-Server
    • 1
    • False
    • False
    • Documentation (Ref Guide, User Guide, etc.)
    • ER1
    • +
    • 2022 Week 02-04 (from Jan 10)

      With a payload like this,

      {
        "lookup" : "StatelessKieSession",
          "commands" : [ {
            "insert" : {
              "object" : {"com.nonexisting.Person":{"name":"taro","age":"20"}},
              "out-identifier" : "person",
              "return-object" : "true",
              "entry-point" : "DEFAULT"
             }
          }, {
              "fire-all-rules" : { }
         } ]
      }
      

      if JSONMarshaller cannot find a class "com.nonexisting.Person" from classloader, it deserializes the object as a LinkedHashMap with a key "com.nonexisting.Person". It may just result in no matching rule.

      https://github.com/kiegroup/droolsjbpm-integration/blob/7.52.0.Final/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/json/JSONMarshaller.java#L807-L808

      However, users may want a warning or an Exception. This JIRA is to add a system property switch to choose the behaviour.

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-hmiura Hiroko Miura
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: