0

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?

user1727072
  • 309
  • 4
  • 14
  • 2
    Getting `WELD-001408 Unsatisfied dependencies for type...` does not mean that all injections fail. It means there was a deployment failure for because of an unsatisfied dependency for one injection point. Posting some code for the extension in question, the complete error and stack trace, as well as the contents of your extension would help give you an answer. – rdcrng Mar 20 '13 at 14:45
  • @rdcrng please take a look at my edit. By "all injections fail" I mean, that every Injection that worked perfectly fine before does not work anymore. – user1727072 Mar 21 '13 at 09:45

0 Answers0