【发布时间】:2015-02-19 11:05:35
【问题描述】:
直到昨天,我还在为所有 Web 应用程序使用 eclipse 和 tomcat 7.0。不幸的是,我丢失了我的 Eclipse 文件夹(这是我正在运行的 exe)和临时文件夹(这是工作区目录)。但是我有那个解压的 eclipse 文件夹的备份,所以我过去了它并开始 eclipse 在新工作区(home/xx/newtemp)中添加新项目并尝试由 tomcat 7.0 运行,但我得到“无法清理服务器过时的文件:空 java.lang.NullPointerException"。这里我通过图片展示我的问题,
注意:即使 tomcat 启动并且主页在 localhost:8081 中运行,但是当我添加新项目并在 tomcat 中运行时,出现同样的错误并且没有任何反应。
到目前为止我都试过了,
1 stop server
2 project -> clean
3 project build (I had automatic build disabled)
4 delete server
5 delete Servers folder
6 restart Eclipse
还有,
Click on Servers tab and Stop the server in use if it's running
Right click on the server again and select Clean...
Right click again and select Clean Tomcat Work Directory...
还有,
you have to delete the .snap file located in the directory :
<workspace-directory>\.metadata\.plugins\org.eclipse.core.resources
After deleting this file, you could start Eclipse with no problem.
还有,
To resolve this issue you have to delete tmp folder in the following directory
<workspace-directory>\.metadata\.plugins\org.eclipse.wst.server.core
If there is any problem on deleting this folder then restart your eclipse then again delete that folder.
我尝试了很多方法,但我找不到解决方法。
我希望有人能帮我解决这个问题。
【问题讨论】:
-
您是否尝试删除
Servers项目?执行此操作时选择从硬盘中删除 -
@Arkantos 是的,我现在试过了,但同样的错误......
-
所以我在 Servers 选项卡中看到的 tomcat 定义是您在新的 eclipse 副本中添加的,对吗?
-
@Arkantos 是的,你是对的。
-
在您的 Tomcat 目录中,尝试删除
temp、work的内容,如果您的旧项目在webapps文件夹中,请将其删除。
标签: java eclipse tomcat nullpointerexception