Java:如何从神秘的堆栈跟踪中理解?

时间:2011-01-25 14:18:52

标签: java unit-testing spring stack-trace

在尝试运行单元测试时,我得到以下堆栈跟踪。我甚至不知道从哪里开始寻找(请阅读下面的评论)。

我应该从哪里开始,你会采取什么措施来解决这个问题?

(请注意,以下堆栈跟踪基本上是我如何从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

非常欢迎任何帮助。

1 个答案:

答案 0 :(得分:6)

采取信息的重要部分:

Error creating bean with name 'acceptanceChain' defined in class path resource 

我猜豆接受链不能实现。也许是因为它有一个布尔参数,其中一个尝试注入LinkedHashMap,如下面的消息所示:

Failed to convert value of type [java.util.LinkedHashMap] to required type [boolean]