This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253528 - Cannot run clean after install because persistence.xml is locked
Summary: Cannot run clean after install because persistence.xml is locked
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.1
Hardware: PC Windows 8
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-16 14:58 UTC by misterm
Modified: 2015-07-31 23:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (938.66 KB, text/plain)
2015-07-16 14:58 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2015-07-16 14:58:17 UTC
For all my Java EE projects (with different pom and profile strategies), my second clean install build fails with:

Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project sin-plus-core: Failed to clean project: Failed to delete C:\projetos\sin-plus\sin-plus-core\target\classes\META-INF\persistence.xml -> [Help 1]

Something in the IDE is locking the file, so the only workaround is to kill NetBeans.

Product Version = NetBeans IDE Dev (Build 20150716-7a93174cf75e)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.8.0_40
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Comment 1 misterm 2015-07-16 14:58:26 UTC
Created attachment 154683 [details]
IDE log
Comment 2 Petr Hejl 2015-07-29 19:50:14 UTC
Can you share a project where this happens for testing?
Comment 3 Petr Hejl 2015-07-30 08:09:08 UTC
Do you use Java EE server? Even the server may lock the file.
Comment 4 Petr Hejl 2015-07-30 08:37:39 UTC
This works fine for me. AFAIK IDE should not lock files in target directory. The server may run project from target directory however when Clean & Build is invoked from the IDE, project is undeployed first. Please describe the exact steps you do in order to reproduce the issue.
Comment 5 Sergey Petrov 2015-07-31 23:51:34 UTC
this issue may be a duplicate for a problem with hibernate keeping persistence.xml stream open