FAQ
Common errors
The start-up and build errors you will meet, and what they mean.
ProviderNotFoundException: No provider registered for X
Something asked for X and no module provides it. Add it to the providers of a module that is imported, or, if it is built from configuration (a database, a secret), import the module that creates it: import(OrmModule.forRoot { ... }).
[ksp] A (in M) needs B, but it is not visible in M
The build-time check found that A depends on B and no module in M's imports provides it. Export B from the module that owns it (exports = [B::class]) and import that module, or list B in M's own providers.
DuplicateProviderException: More than one provider registered
Two modules provide the same type. Remove one, or give one a different token.
CircularDependencyException: A -> B -> A
Break the cycle with by inject() on one side (Circular dependency).
@Entity X must be a data class
The generated mapper uses the constructor and copy(). Make the entity a data class (or a Java record/class).
@Entity X needs exactly one @Id property
Mark one constructor property @Id. (An annotation on a base class's property is not inherited: put it on the entity's own constructor property.)
@Locked / @Retry / @Transactional does nothing
Method decorators work through a generated subclass: the class and the method must be open, and the call must come from another bean (a call to this.method() bypasses it).
The schema declares scalar X but nothing implements it
Register it in the GraphQL options with scalar(...), or use one of the ready-made ones (DateTime, Date, Long, BigDecimal, UUID, JSON).
InvalidPagingException: Cannot sort by 'x'
The sort named something that is not a stored property of the entity. The message lists the sortable ones. From HTTP it is a 400.
Database tests skipped, or Connection is not available
Connection pools leaked across tests, or the database's connection limit was reached. Close the Orm after each test class and raise max_connections on the test database.
No provider registered for io.kest.http.Codec
Import a JSON module: imports = [JacksonJsonModule::class].