MyEclipse 保存文件时报错 An internal error occurred during: "Building Spring AOP reference model" 的解决方法

问题描述:

因为使用了Spring 的 AOP,每次在保存的时候都报如下错误:

An internal error occurred during: "Building Spring AOP reference model".
java.lang.IllegalArgumentException
MyEclipse 保存文件时报错 An internal error occurred during:

搜了一大圈的解决方案,在国外的Genuitec上找到了答案,原文如下:
OK. I saw this reply on another post “Thanks for the trace – this is an error in the core of the JDT, very unusual.
Do you have the right Java compiler settings locally? For instance, are the right Java versions configured in the Java Compiler properties page, and does the project have the right JRE assigned to it?
You should be able to prevent the AOP builder from running by going to Project properties > Project Facets > Spring and then choose the “General Project Configuration” tab. You can deselect the “AOP Reference Model Builder” here. Alternatively, you could turn this off globally at the preferences level too. Note that this will disable some of the cross-cutting information displayed in the Spring Explorer and some hyperlink based navigation in Spring configuration files, so ideally, it would be good to get the project settings corrected to prevent this error.”
And I turned off the setting and i don’t get that error any longer.

翻译过来的解决方案如下:
打开Project properties > Project Facets > Spring 

MyEclipse 保存文件时报错 An internal error occurred during:


然后看到 “General Project Configuration” 标莶被选择
先勾选上Enable project specific settings

再取消选择“AOP Reference Model Builder”,OK,问题解决。


MyEclipse 保存文件时报错 An internal error occurred during:

如果上面的方法不能解决你的问题,网上还有一个方案,如下:

由于错误发生在更改保存拥有spring配置语法的beans.xml(Spring配置文件)时发生,所以可以推知是Spring IDE框架的验证(Validate)错误。目前还没有找到解决问题的方法,而这也不影响程序的运行,AOP也依然能正常运行,所以我只设置了关闭该错误对应的Spring验证。
关闭方法:window--->preference--->Spring--->Validation--->Project Builder,把AOP Reference Model Builder的勾去掉即可。

你可能感兴趣的:(JAVA)