【发布时间】:2013-07-12 13:19:47
【问题描述】:
我有一个装有最新版本 Java (java/jdk1.7.0_25) 和 tomcat (apache-tomcat-7.0.42) 的 Linux 机器。当我部署战争时,我得到:
ERROR 2013-07-12 09:55:36,591: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'engageOrderConfig': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deliveryDtoToEngageRetailTransactionDelivery': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.company.engage.adapter.converter.customer.CustomerDTOToRetailTransactionCustomerExtension com.company.engage.order.adapter.converter.DeliveryDtoToEngageRetailTransactionDelivery.customerConverter; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.company.engage.adapter.converter.customer.CustomerDTOToRetailTransactionCustomerExtension] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
还有其他的……
事情是在另一个 linux 机器上部署这场战争,它开始时没有问题。
我尝试了几个版本的tomcat,我换成OpenJDK。另外,我从正在部署 jar 且没有错误的 linux 框中复制了 tomcat,并且我遇到了同样的错误。
任何人都可以对此有所了解吗?
【问题讨论】:
-
除了这场战争之外,这个工作的盒子是否还部署了其他东西?
-
你能发布完整的堆栈跟踪吗?
-
No matching bean of type [com.starmount.engage.adapter.converter.customer.CustomerDTOToRetailTransactionCustomerExtension] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.你确定这个 bean 可用吗? -
我添加了完整的堆栈跟踪。 @reto:是的,同样的战争在我旁边的 linux 中运行良好:(
-
@Kummo:.war 中是否有一个实现
CustomerDTOToRetailTransactionCustomerExtension的类?如果没有,另一个盒子是从哪里得到这个实现的?
标签: java linux tomcat deployment war