2

我正在使用 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。我已经尝试过“静态”和“动态”脚手架,但它并没有解决问题。

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

4

2 回答 2

0

一位有类似错误的用户通过删除他的 ~/.grails 目录中的项目文件夹来修复它。 http://grails.1312388.n4.nabble.com/Database-migration-plugin-Running-dbm-gorm-diff-results-Error-creating-bean-with-name-instanceContro-td4637567.html

一个好的 ol' grails clean 可能也有帮助,而且侵入性更小。

此外,如果您可以通过源代码管理(git、mercurial、svn)共享项目,您可以尝试在另一台机器上重现该问题。如果你不能,这是一个很好的迹象,表明这个问题是你的环境所特有的,可以通过某种清理来解决。

于 2013-11-17T04:03:41.757 回答
0

我已经解决了我的问题。我不确定它为什么会发生,但我有很多控制器,其中脚手架 = true。我生成了所有控制器和视图,它解决了我的问题。

于 2013-11-19T05:33:08.380 回答