If i register a concrete resource class, injection works correct e.g.:
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.register(RootResource.class);
public class RootResource
{
@Inject
@SimpleDb(value="mariadb")
private EntityManager em;
@GET
@Produces({ "text/plain" })
public final String getValue()
{
...............................
But now, i load a resource class dynamically, with
c = Class.forName(.....);
and register ist with
resourceConfig.register(c);
Unknown HK2 failure detected:
MultiException stack 1 of 1
org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl .......................
Have u overseen something, or is it not possible to use
such anonymous classes?
( With maven i use
)
If i register a concrete resource class, injection works correct e.g.:
But now, i load a resource class dynamically, with
or
But, it doesn't work and crashes with error
Unknown HK2 failure detected: MultiException stack 1 of 1 org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl .......................
Have u overseen something, or is it not possible to use such anonymous classes?
Environment
Java SE 1.8.0_92-b14 Windows 7
Affected Versions
[2.14]