Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 异常发生在测试用例结束时_Maven_Testing_Grails_Grails 2.1 - Fatal编程技术网

Maven 异常发生在测试用例结束时

Maven 异常发生在测试用例结束时,maven,testing,grails,grails-2.1,Maven,Testing,Grails,Grails 2.1,我使用Maven进行依赖关系管理。当我运行测试用例时,在测试用例结束时会发生异常,尽管测试用例成功通过 以下是我的堆栈跟踪: 2013-10-08 16:04:22,839 [Thread-15] ERROR plugins.DefaultGrailsPlugin - Error configuration scaffolding: Error creating bean with name 'instanceControllersApi': Singleton bean creati

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


我也提到了这个问题,但运气不好。

一个出现类似错误的用户通过删除其~/.grails目录中的项目文件夹修复了这个问题。

一个好的“圣杯清洗”也可能会有所帮助,而且侵入性也会更小


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

我已经解决了我的问题。我不知道为什么会发生这种情况,但我有很多控制器,其中scaffold=true。我生成了all控制器和视图,它解决了我的问题。

我有这个问题,老实说,我不确定它是如何修复的。但正如我在这些评论中提到的,我的似乎与动态脚手架控制器有关。也许我对它们进行了一些测试,并在重新分解时删除了它们,这就解决了我的问题。如果生成的测试为空,请删除它们,看看这是否有帮助。还有一个建议是尽量缩小测试范围,对他们进行注释,找出是哪个测试套件导致了它。