0
私が持っている「要求-詳細-upload.xml」が必要なタイプにタイプ[java.util.ArrayListの]のコンストラクタ引数の値を変換できませんでした[java.util.Listに]
という名前のこのような春のxmlファイル<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
">
<import resource="classpath:META-INF/jobs/environment.xml" />
<import resource="classpath:META-INF/jobs/clients.xml" />
<import resource="classpath:META-INF/jobs/edx/request-details.xml" />
<import resource="classpath:META-INF/jobs/dynamoDbClients.xml" />
<bean id="requestDetailsFetchAndDecryptDataDao" class="com.amazon.edx.dao.FetchAndDecryptDataDaoDynamoDbImpl"
c:dataUploadDao-ref="requestDetailsDataUploadDao"
c:dataTransformer-ref="requestDetailsDataTransformer"
/>
<util:list id="requestDetailsKeyItemAttributesMetadata" value-type="com.amazon.edx.manager.ItemAttributesMetaData">
<ref bean="RequestId"/>
<ref bean="RequestDate"/>
</util:list>
<util:list id="requestDetailsNonKeyItemAttributesMetadata" value-type="com.amazon.edx.manager.ItemAttributesMetaData">
<ref bean="CreatedBy"/>
<ref bean="UpdatedTime"/>
</util:list>
<bean id="RequestId" class="com.amazon.edx.manager.ItemAttributesMetaData"
c:itemAttributeName="RequestId"
/>
<bean id="RequestDate" class="com.amazon.edx.manager.ItemAttributesMetaData"
c:itemAttributeName="RequestDate"
/>
<bean id="CreatedBy" class="com.amazon.edx.manager.ItemAttributesMetaData"
c:itemAttributeName="CreatedBy"
/>
<bean id="UpdatedTime" class="com.amazon.edx.manager.ItemAttributesMetaData"
c:itemAttributeName="UpdatedTime"
/>
<!-- upload manager -->
<bean id = "requestDetailsDataUploadManager" class ="com.amazon.edx.manager.DataUploadManagerImpl"
c:fetchAndDecryptDataDao-ref="requestDetailsFetchAndDecryptDataDao"
c:keyAttributes-ref="requestDetailsKeyItemAttributesMetadata"
c:nonKeyAttributes-ref="requestDetailsNonKeyItemAttributesMetadata"
/>
<bean id = "requestDetailsUploadToEdx" class = "com.amazon.edx.UploadDataToEdx"
c:dataUploadManager-ref ="requestDetailsDataUploadManager"
/>
</beans>
と要求-details.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
">
<bean id="requestDetailsDataUploadDao" class="com.amazon.edx.dao.DataUploadClientImpl"
c:someName="xxxxxxxxxx"
c:otherName="yyyyyyyyy"
/>
<util:list id="requestDetailsColumnMetaData" value-type="com.amazon.edx.transformer.ColumnMetaData">
<ref bean="RequestId"/>
<ref bean="RequestDate"/>
<ref bean="CreatedBy"/>
<ref bean="UpdatedTime"/>
</util:list>
<bean id="RequestId" class="com.amazon.edx.transformer.ColumnMetaData"
c:attributeName="RequestId"
c:dataType="VARCHAR2"
c:columnDisplayName="REQUEST_ID"
/>
<bean id="RequestDate" class="com.amazon.edx.transformer.ColumnMetaData"
c:attributeName="RequestDate"
c:dataType="VARCHAR2"
c:columnDisplayName="REQUEST_DATE"
/>
<bean id="CreatedBy" class="com.amazon.edx.transformer.ColumnMetaData"
c:attributeName="CreatedBy"
c:dataType="VARCHAR2"
c:columnDisplayName="CREATED_BY"
/>
<bean id="UpdatedTime" class="com.amazon.edx.transformer.ColumnMetaData"
c:attributeName="UpdatedTime"
c:dataType="NUMBER"
c:columnDisplayName="UPDATED_TIME"
/>
<bean id="requestDetailsDataTransformer" class="com.amazon.edx.transformer.DataTransformerImpl"
c:dataFlattener-ref="requestDetailsDataFlattener"
c:columnMetadata-ref="requestDetailsColumnMetaData"
c:delimiter="{tabDelimiter}"
/>
<util:constant id="tabDelimiter"
static-field="com.amazon.edx.transformer.Delimiters.TAB_DELIMITER" />
<bean id="requestDetailsDataFlattener" class="com.amazon.edx.flattener.JsonDataFlattenerImpl"
c:multipleRowColumnName=""
/>
</beans>
という名前の別のXML私は、次のエラーを取得しています:
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestDetailsDataTransformer' defined in class path resource [META-INF/jobs/edx/request-details.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.util.List]: Could not convert constructor argument value of type [java.util.ArrayList] to required type [java.util.List]: Failed to convert value of type 'java.util.ArrayList' to required type 'java.util.List'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.amazon.edx.manager.ItemAttributesMetaData] to required type [com.amazon.edx.transformer.ColumnMetaData]: no matching editors or conversion strategy found
java.util.ArrayList
からjava.util.List
に変換できないと言われています。私はjava.util.ArrayList
を使っていません。私はSpringには新しく、このエラーの正確な原因を理解することはできません。
何か助けていただければ幸いです。 ありがとう