• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse. Deleting my xml files?

 
Erap Estrada
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34851
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Erap,

where did you put them?
 
Erap Estrada
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try it. Thanks Guys!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic