wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse. Deleting my xml files? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse. Deleting my xml files?" Watch "Eclipse. Deleting my xml files?" New topic
Author

Eclipse. Deleting my xml files?

Erap Estrada
Ranch Hand

Joined: Nov 08, 2006
Posts: 92
This happened several times, that for some reason my hibernate configuration files and other mapping files suddenly disappear. Any experiences on this and how can i possibly avoid it?

Thanks in advance!


SCJP with 98% by...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Erap,
As you can guess, it is hard to give useful advice from a vague description. Unfortunately, I'm sure you don't have more information.

Try looking in the workspace directory from your operating system to confirm the files are really gone. Also, note you can do "replace with local history" within Eclipse to get files back that were in your workspace.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That happened to me too, but it was for properties files. When I put the properties files into a "source" directory, along with my Java source code, rebuilding the project copied them into the directory where compiled classes went.

That's a bit vague on my part, too, because I don't remember the details. However I have a project with Hibernate XML files too. They are supposed to be in the classpath, so I put them in the root of the project. They don't disappear.

Hope some of that helps.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Erap,

where did you put them?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Erap Estrada
Ranch Hand

Joined: Nov 08, 2006
Posts: 92
The hibernate config files, mapping, and property file are all in classes folder.

I've checked the "replace with local history", and those files are not listed. I guess only the files that are explicitly deleted will be listed there.

I am using struts, apache tomcat, hibernate on this project and I am using eclipse.

To be honest, i have no idea which among those technologies is the culprit.
I suspect though that during a restart of apache, this thing happen.

Please help guys!
[ April 30, 2007: Message edited by: Erap Estrada ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I think when Eclipse does a full build, it totally purges the classes folder.

Put them in a source folder instead. All non-class files from source folders are automatically copied into the class folder during build time.
Erap Estrada
Ranch Hand

Joined: Nov 08, 2006
Posts: 92
I will try it. Thanks Guys!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Eclipse. Deleting my xml files?
 
Similar Threads
Namespace dump in JBoss
Help on Axis AdminClient Error
Readme must list every file?
WA #1.....word association
accessing resource files that are jarred in javawebstart