Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Eclipse Kepler R2 keeps locking persistence.xml file, preventing project building
Eclipse Kepler R2 keeps locking persistence.xml file, preventing project building [message #1481994] Fri, 21 November 2014 11:45 Go to next message
David del Río Medina is currently offline David del Río MedinaFriend
Messages: 2
Registered: November 2014
Junior Member
Hello.
Everytime I try to build my project this message appears:

Description Resource Path Location Type
The project was not built due to "Could not delete '/Anuncios/build/classes/META-INF'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent


This META-INF directory contains the persistence.xml file. It has to be in the classpath. I have it under resources/ right now, but I have the same problem if I locate it under src/.

If I try to delete it, Windows complains that some application has opened this file. This application is Eclipse, that for some reason keeps this file locked and the only way to remove it is by closing Eclipse first.

So, everytime a start Eclipse, I can clean and build the project once. The next time it shows the message error above.

¿Any ideas?

PS: As stated above, the solution provided in StackOverflow (Eclipse keeps bin/META-INF/persistence.xml in use) about moving the folder out of src/ did not work for me.

I'm using Eclipse Java EE Kepler SR2 Build 20140224-0627
Re: Eclipse Kepler R2 keeps locking persistence.xml file, preventing project building [message #1482139 is a reply to message #1481994] Fri, 21 November 2014 14:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
David,

It would be better to ask on the Web Tools forum.

On 21/11/2014 3:00 PM, David del Río Medina wrote:
> Hello.
> Everytime I try to build my project this message appears:
>
> Description Resource Path Location Type
> The project was not built due to "Could not delete
> '/Anuncios/build/classes/META-INF'.". Fix the problem, then try
> refreshing this project and building it since it may be inconsistent
>
> This META-INF directory contains the persistence.xml file. It has to
> be in the classpath. I have it under resources/ right now, but I have
> the same problem if I locate it under src/.
>
> If I try to delete it, Windows complains that some application has
> opened this file. This application is Eclipse, that for some reason
> keeps this file locked and the only way to remove it is by closing
> Eclipse first.
>
> So, everytime a start Eclipse, I can clean and build the project once.
> The next time it shows the message error above.
>
> ¿Any ideas?
>
> PS: As stated above, the solution provided in StackOverflow (Eclipse
> keeps bin/META-INF/persistence.xml in use) about moving the folder
> out of src/ did not work for me.
>
> I'm using Eclipse Java EE Kepler SR2 Build 20140224-0627


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Kepler R2 keeps locking persistence.xml file, preventing project building [message #1482205 is a reply to message #1482139] Fri, 21 November 2014 15:33 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Moving this to the Web Tool forum
Re: Eclipse Kepler R2 keeps locking persistence.xml file, preventing project building [message #1485389 is a reply to message #1482205] Mon, 24 November 2014 07:42 Go to previous message
David del Río Medina is currently offline David del Río MedinaFriend
Messages: 2
Registered: November 2014
Junior Member
It is a problem with Hibernate's JPA 2 Metamodel Generator docs.jboss.org/hibernate/jpamodelgen/1.0/reference/en-US/html_single/.
It looks like people using NetBeans have this problem too netbeans.org/bugzilla/show_bug.cgi?id=241666.
I am going to look for a solution that does not rely on deactivating this.
Previous Topic:Suffix 'Service'
Next Topic:How to navigate to element in static web source from browser?
Goto Forum:
  


Current Time: Thu Apr 18 23:34:44 GMT 2024

Powered by FUDForum. Page generated in 0.01786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top