jmapper-framework / jmapper-core

Elegance, high performance and robustness all in one java bean mapper
http://jmapper-framework.github.io/jmapper-core
Apache License 2.0
227 stars 41 forks source link

Library doesn't work in CDI environment #64

Open EgatlovS opened 7 years ago

EgatlovS commented 7 years ago

When used in a Java EE project the following exception occurs:

WELD-001408 Unsatisfied dependencies for type [Set] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject com.google.common.util.concurrent.ServiceManager(Set)]

The problem is that CDI tries to inject a Set of com.google.common.util.concurrent.Service but there is nothing that provides it.

Possible Solutions:

@Produces Set<Service> dummyServices() {
  return new HashSet<>();
}
Solution found here
avurro commented 7 years ago

Thank you for the support, i will work on it as quickly as possible :+1: