I'm developing under IBM RAD 9 the application for WebSphere 8.5, using EJB 3 :(
I've split the project to following maven modules:
- dto (only 'stupid' transfer objects)
- ejb (the business logic)
- web (the REST channels, build type is WAR)
- ear (well, build type is EAR)
EJB module has empty beans.xml file in META-INF. There's a producer class there, that produces some my.ejb.HelperClass
@ApplicationScoped
public class MyHelperProducer {
@Produces
@ApplicationScoped
public HelperClass produceGenWsClient() {
....
}
}
The usage is quite trivial:
@Inject
private HelperClass helper;
It was already functioning! After some changes in the code (involving refactoring of many fields in many classes, but not those involved!) Everything stopped to function. Now I get error messages like that:
[8/27/14 16:33:38:960 CEST] 00000063 BeansDeployer E BeansDeployer deploy javax.enterprise.inject.UnsatisfiedResolutionException: Api type [my.ejb.HelperClass] is not found with the qualifiers Qualifiers: [@javax.enterprise.inject.Default()] for injection into Field Injection Point, field : private my.ejb.HelperClass my.web.MyChannel.helper, Bean Owner : [WSEjbBean [businessLocals=[my.web.MyChannel], ejbName=MyChannel1710565165,Name:null,WebBeans Type:ENTERPRISE,API Types:[java.lang.Object,my.web.MyChannel],Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]] InjectionType : [class my.ejb.HelperClass] Annotated : [Annotated Field,Base Type : class my.ejb.HelperClass,Type Closures : [class my.ejb.HelperClass, class java.lang.Object],Annotations : [@javax.inject.Inject()],Java Member Name : helper] Qualifiers : [[@javax.enterprise.inject.Default()]] at org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92) at org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:96) at org.apache.webbeans.container.InjectionResolver.checkInjectionPoints(InjectionResolver.java:189) at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1092) at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:394) at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:332) at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:183) at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124) at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78) at com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106)
The 'funny' thing there is, I've already got such errors in other application, but then I've solved them by starting server clean and deleting and reimporting the project to the workspace. Now, however, even that didn't work.
What is actually a problem here? Is there a big bug in the RAD? Or I'm doing something wrong, that was only incidentally working before? How can I diagnose such errors?