The root cause of this is rest-assured *ObjectMapperFactory package names changing, for example between versions 3.x and 4.x.
For anyone coming across this after the release of rest-assured 4.0.0, this problem can appear in Spring Boot projects – caused by a version mismatch between rest-assured and its transitive dependencies on json-path and xml-path in the spring-boot-dependencies bom.
If you specify a dependency io.rest-assured:rest-assured:4.0.0, you also need to explicitly include io.rest-assured:json-path:4.0.0 and io.rest-assured:xml-path:4.0.0, otherwise spring-boot-dependencies will pull in version 3.1.1 with the old *ObjectMapperFactory package names.