Eclipse 问题视图中的空错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5492310/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Empty Errors in Eclipse Problems View
提问by gnielsen
I recently converted my work dev environ from Idea to Eclipse. I've got everything in and building properly, but I have 23 empty error messages in my Problems view. I can still build everything despite these errors, but it is quite annoying to have the "Errors in project" popup when building.
我最近将我的工作开发环境从 Idea 转换为 Eclipse。我已经完成了所有内容并正确构建,但我的问题视图中有 23 条空错误消息。尽管有这些错误,我仍然可以构建所有东西,但是在构建时弹出“项目中的错误”是很烦人的。
The project "Web_ImageViewer" is a GWT project.
项目“Web_ImageViewer”是一个 GWT 项目。
I have a hunch that these errors are somehow related to ignoring GWT output folders, but I'm not sure.
我有一种预感,这些错误在某种程度上与忽略 GWT 输出文件夹有关,但我不确定。
I can delete these errors, but they just come back. Anyone have any idea how I can permanently get rid of these? Or if they are actually trying to tell me something useful?
我可以删除这些错误,但它们又回来了。任何人都知道我如何永久摆脱这些?或者他们是否真的想告诉我一些有用的东西?
(I can't post an Image since I'm a new user)
(由于我是新用户,我无法发布图片)
回答by Sean Adkinson
Check the Problems tab "Type" column to see what validator the errors are being generated from. If the errors are useless, try turning off that kind of validation and doing a clean and build. Go to Preferences > Validation at the global level, or turn off validation for individual projects by right-clicking project > Properties > Validation
检查问题选项卡“类型”列以查看生成错误的验证器。如果错误没有用,请尝试关闭这种验证并进行清理和构建。转到全局级别的首选项 > 验证,或通过右键单击项目 > 属性 > 验证来关闭单个项目的验证
I regularly turn off my HTML validator since the HTML isn't well-formed when you are working with JSPs.
我经常关闭我的 HTML 验证器,因为当您使用 JSP 时 HTML 格式不正确。
Update
更新
Seems like a lot of people are narrowing unknown errors down to the Web (2.2-2.4) Validator. Try turning that one off and rebuilding.
似乎很多人都将未知错误范围缩小到Web (2.2-2.4) Validator。尝试将其关闭并重建。
回答by Vilo
I narrowed it down to "Web (2.2-2.4) Validator". After disabling it you need to Clean the project for the error to disappear.
我将范围缩小到“Web (2.2-2.4) Validator”。禁用它后,您需要清理项目以使错误消失。
回答by user2688104
I was also facing the same error, it worked with simple trick. I selected my web project and right click>validate
.Voila , error disappeared.
我也面临同样的错误,它使用简单的技巧。我选择了我的网络项目和right click>validate
.Voila ,错误消失了。
回答by marvids
I had the same problem and solved it by closing the project and deleting WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECT/.markers
我遇到了同样的问题并通过关闭项目并删除WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECT/.markers解决了它
WORKSPACE is your current workspace folder and PROJECT is the name of your project.
WORKSPACE 是您当前的工作区文件夹,PROJECT 是您的项目名称。
回答by Jimmy James
I had this problem as well.
我也有这个问题。
I can get the error by first adding the .jar
to the /WebContent/WEB-INF/lib folder
, and then adding it to the classpath/Build Path.
我可以通过首先将 加入.jar
到 中/WebContent/WEB-INF/lib folder
,然后将其加入到类路径/构建路径中来获取错误。
I can avoid this error by placing the .jar
in a different folder; for example, I created a /lib
folder.
我可以通过将 放在.jar
不同的文件夹中来避免此错误;例如,我创建了一个/lib
文件夹。
My guess is that the error occurs because the folder it is in (/WebContent/WEB-INF/lib
) is also the folder that it is typically exported to.
我的猜测是发生错误是因为它位于 ( /WebContent/WEB-INF/lib
) 中的文件夹也是它通常导出到的文件夹。
回答by Kai
I had the same symptoms: Validation Messages with no description, location "unknown", created by the Web (2.2-2.4) Validator
.
我有同样的症状:没有描述的验证消息,位置“未知”,由 Web (2.2-2.4) Validator
.
The reason in my case was that the web project depended on two library (utility) projects and both of these contained the same jar file in their respective lib folders.
I deleted the jar in one of them, removed the references to the deleted jar and voila, the errors disappeared.
就我而言,原因是 Web 项目依赖于两个库(实用程序)项目,并且这两个项目在各自的 lib 文件夹中都包含相同的 jar 文件。
我删除了其中一个中的 jar,删除了对已删除 jar 的引用,瞧,错误消失了。
回答by prudence3298
In my case, I got this kind of empty errors because of wrong workspace setting for text encoding. When I fixed this (Menu > Window > Preferences > General > Workspace > Text file encoding), everything goes well.
就我而言,由于文本编码的工作区设置错误,我收到了这种空错误。当我解决这个问题时(菜单 > 窗口 > 首选项 > 常规 > 工作区 > 文本文件编码),一切顺利。
Hope this will help someone.
希望这会帮助某人。
回答by subrat22
This error has gone for my case by disabling setting validation of maven in window preference java EE maven validation .
通过在窗口首选项 java EE maven validation 中禁用 maven 的设置验证,这个错误已经消失了。
回答by Bryant
I also fixed this by (Menu > Window > Preferences > General > Workspace > Text file encoding), change the Text file encoding to "UTF-8"(default is MS950) for my web project, then it works!
我还通过(菜单>窗口>首选项>常规>工作区>文本文件编码)修复了这个问题,将我的Web项目的文本文件编码更改为“UTF-8”(默认为MS950),然后它就可以工作了!
回答by Dai
I had the same problem,but I only got one.
我有同样的问题,但我只有一个。
Location:unknown Type:Validation Message
I solved it by formatting the "/WEB-INF/web.xml
".That means I removed all the unuseful "blank space
","\r\n
","\t
".
我通过格式化“ /WEB-INF/web.xml
”来解决它。这意味着我删除了所有无用的“ blank space
”、“ \r\n
”、“ \t
”。
Good luck and I hope this helped.
祝你好运,我希望这有帮助。