jmapper-core icon indicating copy to clipboard operation
jmapper-core copied to clipboard

Library doesn't work in CDI environment

Open EgatlovS opened this issue 8 years ago • 1 comments

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

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

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:

  • Use a newer Guava version (at least 16, the fix was introduced there, see this commit)
  • Disable CDI
  • Implement a tiny producer
@Produces Set<Service> dummyServices() {
  return new HashSet<>();
}
Solution found here

EgatlovS avatar Mar 03 '17 13:03 EgatlovS

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

avurro avatar Mar 03 '17 13:03 avurro