Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-03-21T13:56:48Z by SystemAdmin
SystemAdmin
SystemAdmin
37422 Posts
ACCEPTED ANSWER

Pinned topic produces and qualifier in weblistener UnsatisfiedResolutionException

‏2013-03-19T06:16:20Z |
I have a weblistener, and a @Produces method is in this weblistener.
like this
@WebListener
public class MyListener implements ServletContextListener {
...
...
...
@Produces
@OneQualifier
public File getFile() {
....
}
}

and this qualifier Object is injected in the other Bean;
like this
@Inject
@OneQualifier
private File someFile;

But when Websphere starts up, I get a error
javax.enterprise.inject.UnsatisfiedResolutionException: Api type http://java.io.File is not found with the qualifiers

and it is OK in GlassFish and Tomee.

Thanks for any ideas
Updated on 2013-03-21T13:56:48Z at 2013-03-21T13:56:48Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    37422 Posts
    ACCEPTED ANSWER

    Re: produces and qualifier in weblistener UnsatisfiedResolutionException

    ‏2013-03-21T13:56:48Z  in response to SystemAdmin
    That means I can not inject a bean which is produced by ServletContextListener?
    I am using Websphere 8.5, but when I use GlassFish or Tomee, it works well.