在尝试运行单元测试时,我得到以下堆栈跟踪。我什至不知道从哪里开始寻找(阅读下面我的评论)。
我应该从哪里开始,您会如何解决这个问题?
(请注意,以下堆栈跟踪基本上是我从 Eclipse 获取它的方式,没有任何格式或任何内容:只有无数行,每行大约 120 个字符)[我只粘贴了五行显然问题发生了]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'acceptanceChain' defined in class path resource
[.../chain/connector/...xml]: Cannot resolve reference to bean 'xxxCommand' while setting constructor argument with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxCommand' defined in class path resource
[.../bl/chain/connector/....xml]: Cannot create inner bean 'yyyDTO#1d95da7' of type [yyyListDTO] while setting bean property 'yyyListDTO'; nested exception
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'yyyListDTO#1d95da7' defined in class path resource
[zzz.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [boolean]: Could not convert constructor argument value of type
[java.util.LinkedHashMap] to required type [boolean]: Failed to convert value of type [java.util.LinkedHashMap] to required type [boolean]; nested exception
is java.lang.IllegalArgumentException: Cannot convert value of type [java.util.LinkedHashMap] to required type [boolean]: no matching editors or conversion
strategy found
非常欢迎任何帮助。
最佳答案
取消息的重要部分:
Error creating bean with name 'acceptanceChain' defined in class path resource
我猜 bean acceptanceChain 不能被实例化。可能是因为它有一个 boolean 参数,试图在其中注入(inject)一个 LinkedHashMap,如以下消息所述:
Failed to convert value of type [java.util.LinkedHashMap] to required type [boolean]
关于Java:如何理解神秘的堆栈跟踪?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4794509/