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

标签 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

非常欢迎任何帮助。

最佳答案

取消息的重要部分:

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/

相关文章:

c# - 如何为 Mediatr INotificationHandler 的单元测试提供最小起订量通知

java - 为什么我的 java 类实现了我不期望的方法?

unit-testing - Mocha/Karma - 如何测试 CSS 属性

java - Spring security - 从自定义登录页面调用自定义身份验证提供程序

java - 如何在单元测试中可靠地对 JPA 实体的更新进行单元测试

spring - 使用 Spring Boot 实现 JsonApi

java - 如何通过 USB 从门户网站访问 Android 中安装的 Sqlite DB

java - EL1057E : No bean resolver registered in the context to resolve access to bean

java - neethi.jar 与 WAS 7 不兼容

java - JTextArea 的 Apache DefaultExecutor 和 Ping 命令