0

I'm building my web project right now and I'm having the following problem. The jar is not in the lib folder. This is the error message I get:

init:
undeploy-clean:
deps-clean:
do-clean:
Deleting directory C:\Users\Laptop\Documents\NetBeansProjects\eAnalytics\build
C:\Users\Laptop\Documents\NetBeansProjects\eAnalytics\nbproject\build-impl.xml:1066: Unable to delete file C:\Users\Laptop\Documents\NetBeansProjects\eAnalytics\build\web\WEB-INF\lib\activation.jar
BUILD FAILED (total time: 9 seconds)

Any ideas why this is happening and how can I solve it.

lv10
  • 1,469
  • 7
  • 25
  • 46
  • Is your application server running against the "C:\Users\Laptop\Documents\NetBeansProjects\eAnalytics\build" folder? If that's the case, it may have obtained a lock on the file. On the other hand, it may just be Windows having locked a file. (It does that every now and then - and can be fixed by a reboot). For more help, post your ant build file. – Anders May 12 '12 at 20:27
  • @Anders thanks - I rebooted this partially fixed the issue. I was able to Clean and build once, but after that I was getting the message again. However, I manually deleted the activation.jar from the lib folder and now it runs without any issues. – lv10 May 16 '12 at 02:39

3 Answers3

2

In your Project folder,there are the following:

  • build
  • dist
  • build.xml

To solve the problem, exit netbeans, open your project folder and delete build, dist folders and build.xml. Then start netbeans. Right click on your project and click clean and build.

That's all.

Ivan Ferić
  • 4,725
  • 11
  • 37
  • 47
Jean
  • 21
  • 2
1

It could be that

  • you are on a folder beyond this path or,
  • have one or more files open from a folder beyond this path.

C:\Users\Laptop\Documents\NetBeansProjects\eAnalytics\build\

close the windows explorer (if you have the folder open) or close the file(s) if you have any open

and re-run your script.

shayan ray
  • 321
  • 1
  • 3
  • Thanks: Fixed the issue by removing the Activation.jar from the lib folder. Now runs without problems. – lv10 May 16 '12 at 02:40
0

Or/And Close the java.exe in your task manager in case of (win OS) to free the resources such as libs from tomcat server and you also may delete the folder build and dist in your project if you could delete them and no message like "the folder files are already used by system" then you can re run and in some cases i change the project properties from jdk 1.6 to jdk 1.7 and retrurn it to 1.6 to refresh

nbproject\build-impl.xml file

shareef
  • 9,255
  • 13
  • 58
  • 89