Eclipse supports the use of bin / META-INF / persistence.xml

On a clean installation of Eclipse Kepler 4.3.2 with a installation that does not contain any aspects of JPA, Spring, anything - just Java, I continue to encounter this strange problem.

When creating a project, but not executing it even once, the bin / META-INF / persistence.xml file is constantly used. Eclipse refuses to rebuild the project because of this, and I cannot delete the file while Eclipse is running.

This lock does not occur with any other (XML) file in the same folder or with any file in any other folder. Only one file. Since Eclipse without the installed Hibernate or JPA tools should not have a clue about the importance of this file, why is this happening? Even the original source file is locked!

How can I debug this?

+4
source share
4 answers

What worked for me (I work with an EAR project> EJB module) moved all the configuration files from prj-root / src / META-INF to the prj-root / resources / META-INF folder, then I changed my Ant script to generate assembly.

EDIT: This happens when using hibernate-jpamodelgen to generate a static metamodel of entities. Upgrade to at least 4.3.9, and you will get rid of the problem (see https://hibernate.atlassian.net/browse/HHH-9528 ).

+1
source

, Windows. jpangamarca, Eclipse Luna , Eclipse.

?

Process Explorer, , XML . "" - " " "DLL..." (Ctrl + F), , , . , eclipse.exe. , , " " ( "" ).

, , :

@echo off
for /f "tokens=3,6,8 delims=: " %%i in ('handle -p eclipse e:\git\ ^| grep ".xml\|.xmi\|.htm"') do echo Releasing %%k & handle -c %%j -y -p %%i

( e:\ git\ , , grep, )

, :

UAC (win 7/8) . .

+1

script , , , , javaw eclipse.

0
source

Source: https://habr.com/ru/post/1544881/


All Articles