I'm trying to write a CDI extension. As soon as I add the META-INF/services/java.enterprise.inject.spi.Extension file, all injections are failing with the message WELD-001408 Unsatisfied dependencies for type...
. The strange thing is, the extension-file can also be empty and this error still happens. When I remove the file, everything is working as expected.
I'm using Glassfish 1.3.2.2.
Does anyone have an idea why this happens? I did not find anyything on google.
//Edit: Code example
I have a REST-resource and I inject a class SomeClass into that resource (see example)
@Path("test")
@Produces("text/plain")
public class SomeResource{
@Inject private SomeClass someclass;
}
This works totally fine when the META-INF/services/java.enterprise.inject.spi.Extension
- file does not exist. As soon as I add the file, I get the WELD-001408 Unsatisfied dependencies...
Exception. Even when the file is empty. Is this a Glassfish-Bug?