【问题标题】:tomcat not running eclipse applicationtomcat没有运行eclipse应用程序
【发布时间】:2015-04-19 03:11:15
【问题描述】:

直到昨天,我一直在为所有 Web 应用程序使用 eclipse 和 tomcat 7.0,但不幸的是我丢失了我的 eclipse 文件夹(这是我正在运行的 exe)和 temp 文件夹(这是工作区目录),所以我尝试在新项目中添加新项目工作区(home/xx/newtemp)并尝试由 tomcat 7.0 运行,但我得到“无法清理过时文件的服务器:null java.lang.NullPointerException"。这里我通过图片展示我的问题,

即使我尝试过,

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...

当我清理 Tomcat 工作目录时,出现如下图所示的错误,

并且服务器仅在 tomcat 7.0 中切换位置。

如何解决这个问题?

【问题讨论】:

    标签: java eclipse tomcat


    【解决方案1】:

    您必须删除目录中的 .snap 文件:

    <workspace-directory>\.metadata\.plugins\org.eclipse.core.resources
    

    删除此文件后,您可以毫无问题地启动 Eclipse。

    Source

    【讨论】:

    • 我看不到的文件夹在哪里。我正在使用 ubuntu 12.04
    • 这是您当前选择的工作目录或工作区。
    • 你的意思是 Eclipse 工作区?如果是,那么除了我的项目和服务器之外,我看不到其他地方。
    • 当我第一次打开 Eclipse 时,要求选择工作区,所以我选择了 home/xxx/eclipseAppHere。所以你要求我在那里检查,但这里没有文件名 .metadata\.metadata\.plugins\ org.eclipse.core.resources.
    【解决方案2】:

    转到%CATALINA_HOME%\webapps\ROOT,并删除旧的现有项目。 %CATALINA_HOME% 是您的 Tomcat 安装目录。

    【讨论】:

    • @M.Manivasagam stackoverflow.com/a/26135350/3728901 如果有帮助,请投票:)
    • 我的问题是,服务器启动成功,但是当我添加项目时,它显示 Removing obsolete files from server... Could not clean server of obsolete files: null java.lang.NullPointerException 并且该项目没有运行。
    猜你喜欢
    • 1970-01-01
    • 2019-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-27
    相关资源
    最近更新 更多