1

I'm doing a POC with Helidon MP + DBClient with MongoDB pokemon example but it is throwing Mapper exception. Only http://localhost:8080/db is working which displays the pokemons in the db. Any help is highly appreciated.

Thank You

Caused by: io.helidon.common.mapper.MapperException: Failed to map class com.oracle.d
x4c.taas.poc.common.Pokemon to java.util.Map<java.lang.String, ?>: Failed to find DB
mapper.
        at io.helidon.dbclient.DbMapperManagerImpl$1.toNamedParameters(DbMapperManage
rImpl.java:148)
        at io.helidon.dbclient.DbMapperManagerImpl.lambda$toNamedParameters$2(DbMappe
rManagerImpl.java:62)
        at io.helidon.dbclient.DbMapperManagerImpl.executeMapping(DbMapperManagerImpl
.java:79)
        at io.helidon.dbclient.DbMapperManagerImpl.toNamedParameters(DbMapperManagerI
mpl.java:61)
        at io.helidon.dbclient.common.NamedStatementParameters.namedParam(NamedStatem
entParameters.java:49)
        at io.helidon.dbclient.common.AbstractStatement.namedParam(AbstractStatement.
java:125)
        at com.oracle.dx4c.taas.poc.common.AbstractPokemonService.lambda$insertPokemo
n$0(AbstractPokemonService.java:98)
        at io.helidon.dbclient.mongodb.MongoDbClient.execute(MongoDbClient.java:122)
        at com.oracle.dx4c.taas.poc.common.AbstractPokemonService.insertPokemon(Abstr
actPokemonService.java:96)
        at io.helidon.webserver.Handler.lambda$create$0(Handler.java:94)
        at io.helidon.common.context.Contexts.runInContext(Contexts.java:98)
        at io.helidon.webserver.Handler.lambda$create$1(Handler.java:94)
        at java.base/java.util.Optional.ifPresentOrElse(Optional.java:201)
        at io.helidon.webserver.Handler.lambda$create$3(Handler.java:93)
        at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Complet
ableFuture.java:714)
        ... 41 more
Mujibur Rahman
  • 313
  • 1
  • 5
  • 17

1 Answers1

1

Resolved the issue myself and posting here in case any one faces same one. Found the solution after comparing the sample helidon se code. what missing is the mapping configuration in

META-INF/services/io.helidon.dbclient.spi.DbMapperProvider adding the mapper class file to this configuration resolved my issue.

Mujibur Rahman
  • 313
  • 1
  • 5
  • 17