繁体   English   中英

在测试用例的末尾发生异常

[英]Exception occurs at the end of test cases

我正在使用Maven进行依赖管理。 当我运行测试用例时,尽管测试用例成功通过,但在测试用例的末尾会发生异常。

以下是我的堆栈跟踪:

2013-10-08 16:04:22,839 [Thread-15] ERROR plugins.DefaultGrailsPlugin  - Error configuration     scaffolding: Error creating bean with name 'instanceControllersApi': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
Message: Error creating bean with name 'instanceControllersApi': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
Line | Method
->> 662 | run in java.lang.Thread
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -     

我正在使用Grails 2.1.3。 我已经尝试了“静态”和“动态”脚手架,但都不能解决问题。

我还提到了此异常是什么意思? 问题,但没有运气。

一个存在类似错误的用户通过删除其〜/ .grails目录中的项目文件夹来修复此问题。 http://grails.1312388.n4.nabble.com/Database-migration-plugin-Running-dbm-gorm-diff-results-Error-creating-bean-with-name-instanceContro-td4637567.html

良好的清洁效果可能也有帮助,并且侵入性较小。

另外,如果您可以通过源代码控制(git,mercurial,svn)共享项目,则可以尝试在另一台计算机上重现该问题。 如果不能,则表明该问题是您的环境所特有的,并且可以通过某种清理方式解决。

我已经解决了我的问题。 我不确定为什么会发生这种情况,但是我在scaffold = true的地方有很多控制器。 我生成了所有控制器和视图,它解决了我的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM