Hi i've defined my constructor as
public DefaultValidationService(Map<DomainType, Map<PaymentScheme, List<ValidationRule<Object>>>> ruleMap, boolean failFast) {
this.ruleMap = ruleMap;
this.failFast = failFast;
}
When i define my constructor argument in spring file like
<constructor-arg>
<map>
<entry key="SUBMISSION">
<map>
<entry key="B2B">
<list>
<bean class="com.voca.csm.dd.validation.rules.pacs.header.ClearingSystemProprietaryRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.header.SubmittingBICValidRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.header.SettlementMethodRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.header.InterBankSettDateOneProcessingDayRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.header.InterbankSettlementAmountWithinClearingLimitRule" parent="abstractValidationRule"/>
</list>
</entry>
</map>
</entry>
<entry key="INSTRUCTION">
<map>
<entry key="B2B">
<list>
<bean class="com.voca.csm.dd.validation.rules.pacs.instruction.TransactionIdentificationRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.instruction.InstructingAgentExistsInBodyOrGrpHeaderRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.instruction.InstructingAgentValidInBodyOrGrpHeaderRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.OriginalDebtorAgentSeqTypeFRSTRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.instruction.DebtorAgentReachableRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.SequenceTypeFRSTOnlyRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.CreditorSchemePrivateIdOtherValueModCheckRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.InterBankSettDateCalendarDaysWarehouseRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.OriginalCreditorSchemePrivateIdOtherValueModCheckRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.OriginalMandateIdentificationRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.OriginalCreditorSchemeIdentificationNameRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.OriginalDebtorAccountValidIBANRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.DebtorAccountValidIBANRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.CreditorAccountValidIBANRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs.instruction.InstructingAgentSubmittingBICRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.SequenceTypeExistsInBodyOrGrpHeaderRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.AmendmentInformationDetailsPresentRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.SequenceTypeExistsOnlyInBodyOrGrpHeaderRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.PaymentTypeInfoExistsOnlyInBodyOrGrpHeaderRule" parent="abstractValidationRule"/>
<bean class="com.voca.csm.dd.validation.rules.pacs003.instruction.CreditorSchemePrivateIdOtherIDSEPACheckRule" parent="abstractValidationRule"/>
</list>
</entry>
</map>
</entry>
</map>
</constructor-arg>
I get this error
Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Map]: Could not convert constructor argument value of type [java.util.LinkedHashMap] to required type [java.util.Map]: Failed to convert value of type [java.util.LinkedHashMap] to required type [java.util.Map]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.util.ArrayList] to required type [java.util.Map] for property 'null': no matching editors or conversion strategy found">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pacs003Parser' defined in class path resource [spring/parser.xml]: Cannot resolve reference to bean 'arrivalPacs003ValidationService' while setting bean property 'validationService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'arrivalPacs003ValidationService' defined in class path resource [spring/validation.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.util.Map]: Could not convert constructor argument value of type [java.util.LinkedHashMap] to required type [java.util.Map]: Failed to convert value of type [java.util.LinkedHashMap] to required type [java.util.Map]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.util.ArrayList] to required type [java.util.Map] for property 'null': no matching editors or conversion strategy found
Any suggestions please.