Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-9564

NoSuchMethodException: com.networknt.schema.TypeValidator when running in native mode

XMLWordPrintable

    • False
    • None
    • False
    • ---
    • ---

      When running in native mode with a workflow which has a JSON schema defined, we get the following exception:

      java.lang.NoSuchMethodException: com.networknt.schema.TypeValidator.<init>(java.lang.String, com.fasterxml.jackson.databind.JsonNode, com.networknt.schema.JsonSchema, com.networknt.schema.ValidationContext)
      	at java.base@17.0.7/java.lang.Class.getConstructor0(DynamicHub.java:3585)
      	at java.base@17.0.7/java.lang.Class.getConstructor(DynamicHub.java:2271)
      	at com.networknt.schema.ValidatorTypeCode.newValidator(ValidatorTypeCode.java:160)
      	at com.networknt.schema.JsonMetaSchema.newValidator(JsonMetaSchema.java:278)
      	... 80 more
      

      The issue is happening after the migration to the new com.networknt:json-schema-validator in KOGITO-9501. It uses reflection to create validators for different parts of the schema. The best way would be to include all validators which implement the com.networknt.schema.JsonValidator interface.

            mmacik@redhat.com Marian Macik
            mmacik@redhat.com Marian Macik
            Marian Macik Marian Macik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: