July 3, 2003 at 3:00 pm #196627
While using myeclipseide I went to remove some jar files from the classpath then went to delete them from the lib directory this deleted about 99% of the whole project. All source, jsp, directories with the exception of Java Source, Web Root, a couple of properties files and a couple xml files.
Thinking this was a fluke I tried it again and it did the same exact thing.
Wow this is major, everything that was being worked on is gone. Also the Application Server I’m working with had items it looks like redeployed under the classes directory their is now another copy of Java Source, Web Root, .myeclipse, .classpath, .mymetadata, .project and if you go into the Java Source/ the package structure from my “myeclipse” project is there but all source and classes are gone. If you go under Web Root/ the structure is there however if you go under WEB-INF classes is there but totally empty.
This really a drastic problem…since we need to update jars on a continuing basis.
I’m using JDK 1.4.2
Windows 2k ProJuly 3, 2003 at 4:07 pm #196630
I can honestly say that we take great care to avoid loss of any data or code. Please help me reproduce this problem with the exact steps you performed. I need a description of exactly how your project is setup and the precise sequence of actions that resulted in the problem. I will try some tests on my own.
Here are some initial thoughts:
1) Eclipse automatically deletes everything in a Java project’s output directory upon a rebuild event. If you manually modify a project’s classpath a rebuild will take place upon closing the project’s properties dialog. A MyEclipse WebProject sets the project’s output folder of <web root>/WEB-INF/classes. So upon a rebuild all contents of this classes directory are deleted by Eclipse.
1a) Do you have any source code or properties files located in the output directory?
1b) Since you were modifying the classpath did you happen to revise the project output path to some other location?
MyEclipse SupportJuly 3, 2003 at 5:24 pm #196633
I reproduced this problem and the GOOD news is that your code has NOT been deleted from the filesystem. Switch from the Java Perspective to the Resource Perspective will show your code is where it should be.
It appears there is a bug that results when modifications are made to the classpath. We are researching this now to determine if it is an Eclipse JDT problem or MyEclipse specific problem. Regardless the consequence is the classpath is toast and the Eclipse Java Perspective becomes confused and does not display project information correctly.
When the classpath is dorked the designated source folder(s) is being forgotten by Eclipes resulting in an appearance that your src folder and other files have been deleted.
The immediate resolution is to manually reestablish the project source folder(s) and classpath. Do the following:
1) From <your web-project> context menu (right-click menu) select Properties
2) Select Java Build Path in left panel and Source tab in right panel
3) You will probably see the <your web-project> folder as the sole source folder. You need to add the previous source folder. In my example I use “Java Source” as my project’s source folder. So I choose Add Folder button to open the Source Folder Selection dialog.
4) I expand the directory tree widget to reveal my former “Java Source” folder. I select it and choose OK to close the Source Folder Selection
5) Eclipse may prompt you with the question “Do you want to remove the project as source folder?” Choose Yes.
6) Next from the Libraries tab manually readd the libraries and jars required by your project. The JDK/JRE and J2EE libraries are added from the Add Library… button
7) Then choose OK from Properties dialog to accept changes and close the dialog
8) Your project should rebuild at this point resulting in the reappeance of the src folder, WEB-INF/… subfolders, and all metadata files.
Please let me know if this does not restore your project completely within the Eclipse navigation view. I will post an update once we have isolated the bug.
MyEclipse SupportJuly 3, 2003 at 8:33 pm #196642
The temporary fix you posted did work.
I’ve done this procedure many times before(prior to myeclipseide installation) without this problem which leads me to believe it is this but I’m very happy with your solution until you can create a fix for this problem.
I thank you once again for you speediness in response and a temporary solution.July 3, 2003 at 8:42 pm #196643
I isolated the problem to an edge condition in the MyEclipse codebase for this situation where the classpath entry has been removed but not archive persist in the WEB-INF/lib directory. The fix has already been committed and will be in the GA build. Note that MyEclipse allows you to dnd archives directly into or out of a WEB-INF/lib directory and the WebProject will automatically add/remove the archive to/from the project classpath accordingly.
MyEclipse SupportJuly 4, 2003 at 10:09 am #196648
What is dnd in relation to an archive in myeclipseide?
When is the GA release set for dissemination?July 4, 2003 at 10:25 am #196649
Michael’s out for the day but I think ‘dnd’ is a typo. What he meant to say was:
Note that MyEclipse allows you to add or remove archives directly into or out of a WEB-INF/lib directory and the WebProject will automatically add/remove the archive to/from the project classpath accordingly.
The GA release date will be July 15th.
MyEclipse SupportJuly 4, 2003 at 10:29 am #196650
Ah, ok thank you.July 4, 2003 at 10:32 am #196652
Upon further reflection I believe he meant “drag and drop” for dnd.
Classpath modification issue and workaround
- This topic has 8 replies, 3 voices, and was last updated 20 years, 5 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)