2

I am working with Intellij Idea (CE)

  • 2020.2.3

And using Gradle 6.7

Path Variables

Where in the OS exists configured, the following about Path Variables in the bash profile:

  • GRADLE_HOME = /Users/username/.../gradle/6.7
  • GRADLE_USER_HOME = /Volumes/FP27072011/gradle/repository

How you can see, customized locations

The /Users/username/.gradle directory is empty.

About Intellij Idea, its configuration for Gradle is as follows:

enter image description here

Same paths as the bash profile.

Note

The following figures that represents the interaction with the IDE, are based on:

  • /Users/username/.gradle directory empty
  • /Volumes/FP27072011/gradle/repository directory empty
  • Working with spring-framework project based on Gradle

It to have a quick discard something around there.

Ok, startup process:

enter image description here

enter image description here

Starts to Sync

enter image description here

A Gradle's daemon is started

enter image description here

After of some seconds fails with:

enter image description here

The error message is:

Gradle could not start your build.
> Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
   > Timeout waiting to lock journal cache (/Volumes/FP27072011/gradle/repository/caches/journal-1). It is currently in use by another Gradle instance.
     Owner PID: unknown
     Our PID: 713
     Owner Operation: unknown
     Our operation: 
     Lock file: /Volumes/FP27072011/gradle/repository/caches/journal-1/journal-1.lock

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

The repository directory shows the following

enter image description here

The /Users/username/.gradle directory shows

enter image description here

Observation: Until this point observe in the two previous Figures that the daemon/6.7 path/directory appears twice in the repository and .gradle directories respectively

Note: When the IDE is closed, just in that moment, in the /Users/username/.gradle directory appears this new file (registry.bin.lock) as follows:

enter image description here

I got this behavior even if I delete the idea-directory-installation/.gradle directory (not /Users/username/.gradle directory) and even with Invalidating Caches/Restart

What is missing, what to do?

Manuel Jordan
  • 13,649
  • 17
  • 81
  • 128
  • 1
    Did you disable antivirus as I advised in https://stackoverflow.com/questions/64861388/intellij-idea-2020-2-gradle-the-cache-entry-for-initialization-script-ijini ? – Andrey Nov 19 '20 at 08:22
  • 1
    Such problems happen when some other process locks the file. The could be problem with processes on your system cannot terminal(exit) properly and hanging locking the files. AV/firewall can cause such issues. – Andrey Nov 19 '20 at 08:23
  • This case is for a Mac, there is no an antivirus, here behaves better than in Windows. About the lock file: when the error is thrown just then in the console/terminal I just execute `gradle --status` and shows nothing, if I execute the same command when the IDE is building just show one daemon. Not sure what is happening – Manuel Jordan Nov 19 '20 at 13:51
  • Once I got resolved this scenario in Mac, I am going to return to Windows. – Manuel Jordan Nov 19 '20 at 14:04
  • 1
    It could be that some another process locks the file. Use `lsof` to check this https://apple.stackexchange.com/a/22265/362450 – Andrey Nov 24 '20 at 09:21

0 Answers0