开发者

Eclipse can't find project source after tomcat restart

开发者 https://www.devze.com 2022-12-22 05:54 出处:网络
I posted this on the eclipse forum in November and didn\'t get an answer. It seems that someone must have experienced this problem before, so I thought I\'d post it here as well.

I posted this on the eclipse forum in November and didn't get an answer. It seems that someone must have experienced this problem before, so I thought I'd post it here as well.

General Description: Every time I restart my local tomcat web server, the next time I hit a breakpoint, eclipse can't find the project source.

Background: I have been using Eclipse at my current job for about seven months. I did not encounter this problem for the first two months but it has been consistent for the last five months. I thought it might be related to a specific project, but it happens on every project I open, even projects that did not previously have the problem.

Details: Each and every time I restart my tomcat web server, then the next time I hit an eclipse breakpoint, the source window is empty with the message "Source not found." in red, and then below that the button: "Edit Source Lookup Path..."

I click on the button, which brings up the Edit Source Lookup Path window with only Default listed under the Source local Lookup Path section.

I click "Add..." which brings up the Add Source window. In that window, I double click on "Java Project" which brings up the Project Selection window. In that window, there is one project listed (the project which is currently open which I am currently debugging).

I check the checkbox next to that project and click OK (leaving the two other checkboxes checked). This takes me back to the Edit Source Lookup Path window and now my project is listed along with Default under the Source Lookup Path section.

I click OK and the source appears in the editor window and I can proceed without any problems until the next time I restart my tomcat server (which I might do ten or more times a day).

Other Info: I have tried modifying the project's Build Path Source section and adding the local code jar to the Build Path libraries, but nothing seems to fix this. I have done a lot of googling and have searched this forum and the bug list, but can't find any relevant information. As I said, this problem only started occurring out of the blue about five months ago and now it happens every single time. Is there an environment variable I need to set?

Any help is much appreciated!开发者_运维知识库

Thanks, Jeremy


Just to follow up, today I took the time to create a new workspace in eclipse and it fixed the problem. It wasn't an easy process because my environment has a lot of tricky settings that needed to be restored. But it's done now.

I accomplished creating a new workspace by simply renaming part of the path to my old projects. Once I did that and restarted eclipse with the -clean option, I had no projects and my old workspace settings were all gone. So, then I just created new projects from the existing code ...

0

精彩评论

暂无评论...
验证码 换一张
取 消