我有一個更高的層次方面,它在服務器啓動時(Tomcat)的獲取以下豆:bean初始化失敗; ConversionNotSupportedException
<bean id="org.sakaiproject.rubrics.api.rubric.RubricsService" class="org.sakaiproject.rubrics.impl.RubricsServiceImpl"
init-method="init"
singleton="true">
<property name="rubricsLogic" ref="org.sakaiproject.rubrics.logic.RURubricLogic" />
<property name="externalLogic" ref="org.sakaiproject.rubrics.api.rubric.ExternalLogic" />
</bean>
這bean類(「RubricsServiceImpl」),實現了一個名爲RubricsService的API接口......到目前爲止一切好。這初始化確定。
下層次結構,當web應用被部署,在這些引用這個bean在applicationContext.xml中的:
<bean id="org.sakaiproject.rubrics.tool.RubricsTool" class="org.sakaiproject.rubrics.tool.RubricsTool">
<property name="rubricsService" ref="org.sakaiproject.rubrics.api.rubric.RubricsService" />
</bean>
在部署應用程序,以下異常被拋出:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.rubrics.tool.RubricsTool' defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.sakaiproject.rubrics.impl.RubricsServiceImpl' to required type 'org.sakaiproject.rubrics.api.rubric.RubricsService' for property 'rubricsService'; nested exception is java.lang.IllegalStateException:
Cannot convert value of type [org.sakaiproject.rubrics.impl.RubricsServiceImpl] to required type [org.sakaiproject.rubrics.api.rubric.RubricsService] for property 'rubricsService':
no matching editors or conversion strategy found
所有的poms包含所有依賴關係他們所屬的地方,因此沒有包裹從定義或任何東西中匱乏。我無能爲力。
這可能是一個類加載器的問題?
以下是我的應用程序結構: