MapStruct requires Impl class
if you use maven, you need to add mapstruct-processor dependency as follows:
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.2.0.Final</version>
</dependency>
Do you have both mapstruct-processor-xx and mapstruct-xx libraries included in your project?
I had the same problem and I realized that I forgot to include mapstruct-processor-xx.
MapStruct generates code at compile time, and the call to Mappers.getMapper(DeviceTokensMapper.class);
will look for the generated implementation of the mapper interface. For some reason it seems to be missing in your deployment unit (WAR etc.).
Btw. when working with Spring as your DI container, you can use @Mapper(componentModel="spring")
and you will be able to obtain mapper instances via dependency injection instead of using the Mappers
factory.