我正在使用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。我尝试过“静态”和“动态”脚手架,但这并没有解决问题。
我还提到了What does this exception mean?问题,但没有运气。
发布于 2013-11-19 05:33:08
我已经解决了我的问题。我不知道为什么会发生这种情况,但是我有很多控制器,其中有scaffold=true。我生成了所有控制器和视图,它解决了我的问题。
发布于 2013-11-17 04:03:41
一个有类似错误的用户通过删除他的~/..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)共享该项目,则可以尝试在另一台计算机上复制该问题。如果你不能,这是一个很好的迹象,这个问题是你的环境特有的,可以通过某种清理来解决。
https://stackoverflow.com/questions/19246183
复制相似问题