[英]BeanNotOfRequiredTypeException on Weblogic 12.2.1.3.0
I have an application (EAR) which works fine on Weblogic 12.2.1.0.0. 我有一个在Weblogic 12.2.1.0.0上运行良好的应用程序(EAR)。
After I upgraded to Weblogic 12.2.1.3.0 the following exception appeared: 在升级到Weblogic 12.2.1.3.0之后,出现以下异常:
Caused By: com.bea.core.repackaged.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'ConfigurationStoreBean' must be of type [com.abc.xxxxx.config.ConfigurationStore], but was actually of type [com.sun.proxy.$Proxy323]
This is the interface I have: 这是我的界面:
public interface ConfigurationStore{
...
}
Implementation: 实现方式:
@Lock(LockType.READ)
@Singleton
@Startup
@Local(ConfigurationStore.class)
public class ConfigurationStoreBean implements ConfigurationStore {
...
}
Any idea what need to be fixed in order to my code can run on Weblogic 12.2.1.3.0? 任何想法都需要解决才能使我的代码可以在Weblogic 12.2.1.3.0上运行?
After two hard workdays I have found the solution. 经过两个工作日,我找到了解决方案。
All the @EJB in the project need to be replaced to @Inject. 项目中的所有@EJB需要替换为@Inject。
The tricky part here was that at the beginning I only amended the @EJBs in related java classes but that was not enough. 这里最棘手的部分是,一开始我只修改了相关Java类中的@EJB,但这还不够。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.