简体   繁体   English

JSF 2,EL Expression,Weblogic和EJB注入

[英]JSF 2, EL Expression, Weblogic, and EJB injection

Well, the problem is this. 好吧,问题是这样的。 I've built a Java EE 5 application and was running in Weblogic 10.3.4. 我已经构建了Java EE 5应用程序并在Weblogic 10.3.4中运行。 I have to add an EJB-Client application that is included as a provided dependency in my EE Application. 我必须添加一个EJB客户端应用程序,该应用程序作为提供的依赖关系包含在我的EE应用程序中。

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? 我不知道发生了什么,因为我没有使用Spring,所以我使用的唯一来自Spring的东西是com.springsource.org.jboss.el依赖项,这个库是否以任何方式附加到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. 编辑我需要做的是在每个bean中添加一个名称来强制jndi查找,仅此而已。

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). 看起来您可能尚未定义com.mycompany.service.ReportFacadeLocal的接口,但已实现了它(或者反过来,取决于名称)。 Does the concrete class exist with the interface using the same name (or otherwise explicitly configured)? 接口使用相同名称(或以其他方式显式配置)的具体类是否存在?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM