eclipse-archived / codewind

The official repository of the Eclipse Codewind project
https://codewind.dev
Eclipse Public License 2.0
114 stars 44 forks source link

SVT [IntelliJ] Error occurred when creating new project: Directory cannot be removed #2951

Open naveenkaratekid opened 4 years ago

naveenkaratekid commented 4 years ago

Codewind version: 0.12 OS: Windows

IDE extension version:0.12 IDE version:IntelliJ 2019-3-5

Description: When I install Codewind and create an Appsody Open Liberty project for the first time, the project creates, but I get this popup error message that says

An error occurred while starting a build for the apps-op project: Directory cannot be removed..

However, if I create another appsody open liberty project, the error message does not show up. Steps to reproduce:

  1. Make sure the codewind images are not there before you start.
  2. Install Codewind in IntelliJ
  3. Create an Appsody Open Liberty project

Screenshot:

Screen Shot 2020-05-14 at 10 04 59 AM

@jagraj

jagraj commented 4 years ago

I can not reproduce this problem with Codewind 0.11.0 release. Looks like this is specific to Codewind 0.12.0 release.

sujeilyfonseca commented 4 years ago

During our call to debug the issue, we reproduced the problem on my Windows VM. The issue seems to be intermittent and occurs when the temp directory is held by a resource, making Codewind unable to delete the directory.

Notes:

Screen Shot 2020-05-14 at 12 19 27 PM Screen Shot 2020-05-14 at 12 25 30 PM
2020-05-14 12:43:08,908 [1965806]   WARN - e.SetupCodewindProjectRunnable - An error occurred creating project cw-appsody-quarkus-2 
java.io.IOException: Directory cannot be removed.
    at org.eclipse.codewind.intellij.core.FileUtil.deleteDirectory(FileUtil.java:106)
    at org.eclipse.codewind.intellij.ui.module.SetupCodewindProjectRunnable.run(SetupCodewindProjectRunnable.java:79)
    at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:247)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)
    at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:441)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$4(ApplicationImpl.java:441)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)
    at com.intellij.util.ConcurrencyUtil.lambda$underThreadNameRunnable$3(ConcurrencyUtil.java:209)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
keithchong commented 4 years ago

Project bind was successful, just before the attempt to delete the temporary folder. The codewind project is valid. I can reproduce this issue but it is intermittent. Users can disregard this error message.