1

Well, the problem is this. I've built a Java EE 5 application and was running in Weblogic 10.3.4. I have to add an EJB-Client application that is included as a provided dependency in my EE Application.

Since I've added that dependency I get the following error:

There was a failure in application ServletContext@1850878[app:my_app-ear module:/my_app-web path:/my_app-web spec-version:2.5]
when attempting to inject dependencies into 
com.mycompany.bean.ReportBean. Dependencies will not be injected into 
this class. com.bea.core.repackaged.springframework.beans.factory.BeanCreationException: 
Dependency injection failure: can't find the bean definition about class 
interface com.mycompany.service.ReportFacadeLocal; nested exception is
com.bea.core.repackaged.springframework.beans.factory.NoSuchBeanDefinitionException:
No unique bean of type [com.mycompany.service.ReportFacadeLocal] is 
defined: No beans of type com.mycompany.service.ReportFacadeLocal;
owner=com.bea.core.repackaged.springframework.context.support.GenericApplicationContext
@6b4c9c: display name [com.bea.core.repackaged.springframework.context.support.GenericApplicationContext@6b4c9c];
startup date [Tue Oct 29 23:38:23 CST 2013]; parent:
com.bea.core.repackaged.springframework.context.support.GenericApplicationContext@1107db9 at
com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:244) at 
com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.inject(Jsr250Metadata.java:226) 

I don't know what's happening, since I'm not using Spring, the only from Spring thing I use is the dependency com.springsource.org.jboss.el, is this library attached in any way to Spring? Is there something else I need to do?

From now, thank you.

EDIT What I needed to do is to add a name in each bean to force the jndi look up, and that was it.

Omar
  • 689
  • 3
  • 16

1 Answers1

0

It looks like you may have not defined an interface of com.mycompany.service.ReportFacadeLocal but have implemented it (or it could be the other way round, depending on names). Does the concrete class exist with the interface using the same name (or otherwise explicitly configured)?

Flare Star
  • 176
  • 1
  • 8
  • Actually I have defined it. About the configuration, I've just annotated the class, it is needed to add some xml configuration? – Omar Oct 31 '13 at 16:15
  • @Omar You should just need to define it with annotations, '@Stateless' generally. In some builds you might need to define it in ejb-jar.xml instead. You should have the client defined using though. – Flare Star Oct 31 '13 at 16:40
  • Ok. Do you have documentation on that regard? – Omar Oct 31 '13 at 17:47
  • The answer here basically covers the purpose of it (and it isn't essential if you have @Local/@Remote annotations), but not sure where otherwise to point you. [Link](http://stackoverflow.com/questions/3484063/using-the-client-jar-in-ejb-3-and-design-patterns) – Flare Star Nov 01 '13 at 12:33