Java API repository service process definition query error ENGINE-16004

Hello everyone!
I am using a Standalone Process Engine with Postgresql database. When trying to retrieve process definitions from my application (Java 8) using Java API:

getProcessEngine().getRepositoryService().createProcessDefinitionQuery();

I get the following exception:

2021-10-27 11:16:08.297 [http-nio-80-exec-1] ERROR org.camunda.bpm.engine.context - ENGINE-16004 Exception while closing command context: Provider for class javax.xml.validation.SchemaFactory cannot be created
javax.xml.validation.SchemaFactoryConfigurationError: Provider for class javax.xml.validation.SchemaFactory cannot be created
Caused by: java.util.ServiceConfigurationError: javax.xml.validation.SchemaFactory: Provider org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl could not be instantiated
Caused by: java.lang.NoClassDefFoundError: org/iso_relax/verifier/VerifierConfigurationException
Caused by: java.lang.ClassNotFoundException: org.iso_relax.verifier.VerifierConfigurationException

This exception occurs when querying for definitions only.
I assume that the problem is in the dependencies, but I haven’t been able to find a solution so far. Any suggestions are welcome.