【问题标题】:Context initialization failing in Liferay 5.2 with Tomcat 7Liferay 5.2 和 Tomcat 7 中的上下文初始化失败
【发布时间】:2011-10-31 12:11:21
【问题描述】:

当我使用 Tomcat 7 在 liferay 5.2 中部署我的 portlet 时,某个 bean 无法初始化。 我正在使用服务构建器来分类这些。 我已经检查了 portlet-spring.xml 并且有 bean 的条目。 而且特定的 bean 确实存在。

ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.tbb.ump.admin.service.FoodLocalService.impl': Injection of BeanReference fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.tbb.ump.admin.service.MeasureUnitLocalService.impl' is defined
at com.liferay.portal.spring.annotation.BeanReferenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(BeanReferenceAnnotationBeanPostProcessor.java:68)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)

无法找出问题,我最近迁移到 Tomcat 7。 环境 : 雄猫 7.0.22 Liferay 5.2.3 服务生成器 5.2 Servlet-API-3 春天 3

【问题讨论】:

    标签: tomcat liferay


    【解决方案1】:

    你可能有 给定类名而不是 bean 名

    没有定义名为“com.tbb.ump.admin.service.MeasureUnitLocalService.impl”的bean

    【讨论】:

    • 你能发一点spring xml文件吗
    • **** *仅供参考..此代码由服务生成器生成
    • 从哪里被引用?这是来自同一个 spring xml 文件吗?
    • 来自食物的 baseImpl @BeanReference(name = "com.tbb.ump.admin.service.MeasureUnitLocalService.impl") protected MeasureUnitLocalService measureUnitLocalService;
    猜你喜欢
    • 2015-09-09
    • 1970-01-01
    • 2019-07-18
    • 1970-01-01
    • 2017-03-17
    • 2014-09-13
    • 2011-11-23
    • 2016-03-08
    • 1970-01-01
    相关资源
    最近更新 更多