NoSuchMethodError - isDeserialization Type Validation Enabled

I am getting below error when I try to get the variables from the process instance using runtimeService.getVariables(processInstance.getProcessInstanceId()).
Note that we get this error only after we set camunda.bpm.default-serialization-format=application/json in the application.properties.

ERROR [org.camunda.bpm.engine.context] [http-nio-8081-exec-30] [5d48ebae-249e-4f6b-b4fa-61867ab4a290] ENGINE-16004 Exception while closing command context: ‘boolean org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.isDeserializationTypeValidationEnabled()’
java.lang.NoSuchMethodError: ‘boolean org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.isDeserializationTypeValidationEnabled()’

Can anyone help on this?