I am working with Liferay 7.2. I am using Liferay Developer Studio and Gradle as a build tool.
While creating a new module project after creating of 1-2 new, getting error message in IDE's workspace .log file and new module project is not creating.
!MESSAGE Synchronize project liferay-workspace failed due to an error connecting to the Gradle build. !STACK 0 org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.2-bin.zip'.
In C:\Users\nirav.prajapati.gradle\daemon\4.10.2\daemon-11084.out file following error shows.
Problem in daemon expiration check java.lang.OutOfMemoryError: GC
overhead limit exceeded FAILURE: Build failed with an exception.
* What went wrong: GC overhead limit exceeded
* 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.
* Get more help at https://help.gradle.org
Problem in daemon expiration check java.lang.OutOfMemoryError: Java
heap space Failed to execute
org.gradle.launcher.daemon.server.Daemon$DaemonExpirationPeriodicCheck#7f47f3a7.
java.lang.OutOfMemoryError: Java heap space FAILURE: Build failed with
an exception.
* What went wrong: Failed to notify build listener. Java heap space
I have increased JVM Heap size by double click on IDE's Server.
Even newly created project is not showing into Gradle Task. In Project Explorer it's showing like incomplete project means folder structure are different then exists. Moreover, .projects and .settings file is also not creating in that.
Multiple time I have make fresh configuration like, remove Liferay developer studio, workspace and .gradle folder from C:\User\
After getting this error, I have restarted system and start again liferay developer studio, but Synchronize Gradle Project with Workspace progress is taking more than 45 min. to complete the process.
Please help me to solve it.
Please these properties in gradle.properties file.
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=500m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
Related
when I want to check my answer(hyperskill practice) in IDE, gradle do not finished and an error has accrued. the error is :
Failed to launch checking
FAILURE: Build failed with an exception.
What went wrong:
Gradle could not start your build.
Cannot create service of type BuildTreeActionExecutor using method LauncherServices$ToolingBuildTreeScopeServices.createActionExecutor() as there is a problem with parameter #18 of type List.
Could not create service of type ConfigurationCacheProblems.
> io/usethesource/capsule/Set$Immutable
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.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
I change gradle dependency from release to master, invalidate cache, restart the intellij, restart computer, change java version, but my problem has not solved
Go to a Gradle cache directory ~/.gradle/caches/ and move it somewhere else or delete it.
Then select JDK 17 as Gradle JVM in Settings/Preferences | Build, Execution, Deployment | Build Tools | Gradle.
After that, ensure that JDK 17 is selected as Project SDK in File | Project Structure.
I have imported a new Gradle project i have to start working on, my IDE is Intellij updated to the latest version 2021.2.4
As soon as the build starts i get:
FAILURE: Build failed with an exception.
* What went wrong:
Gradle could not start your build.
> Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
> Unexpected lock protocol found in lock file. Expected 3, found 0.
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
I have tried every single proposed solution in this thread (90% of them propose to delete the caches from the .gradle or its entire folder), but nothing worked.
Does anyone have a different solution?
My windows 10 FS yesterday night froze and after the restart this issue showed up.
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:
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:
Starts to Sync
A Gradle's daemon is started
After of some seconds fails with:
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
The /Users/username/.gradle directory shows
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:
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?
I am using Crafter 3.0.2 and trying to create deployable bundles through the gradle tooling provided by the craftercms project.
When executing gradlew build deploy bundle -Pcrafter.profile=true, I received the error message:
FAILURE: Build failed with an exception.
* Where:
Build file 'build.gradle' line: 774
* What went wrong:
Execution failed for task ':zipauthoring'.
> archive's size exceeds the limit of 4GByte.
The gradle suggestion following the error above is to enable zip64. So I added zip64 true to the build.gradle pack method's tasks.create("zip${envName}", Zip.class) {, and the bundle task completed successfully.
However, this approach seemed a little invasive. What is the proper procedure for producing a Crafter 3 bundle with profile enabled? If zip64 is to be used for the authoring bundle, is there a command line option that can be provided instead of editing build.gradle? Alternatively, is there a mechanism for creating only the tar.gz archive (which does not appear to have the 4gb file limitation) instead of the zip archive?
There is a ticket now to allow the users to select the bundle they want: https://github.com/craftercms/craftercms/issues/1669
I've never seen a bundle exceed 600MB, you're pushing up against 4GB which is very unusual. While adding 64bit will help it push on, there might be another issue at play here.
Tried to create my first project in android studio, using one of the examples im trying to run the application, but gradle gives me this build error (didnt change one line of code - just trying to run the Empty activity):
Gradle: FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':Passivelocation:packageDebug'.
org.bouncycastle.asn1.ASN1Integer.(J)V
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Ive tried adding info and debug while running the command on with the cli but i cant make much of the output it gives me.
Any suggestions?
I faced the same failure and the problem was with my jdk/jre because some time ago I added the Bouncy Castle Crypto APIs functionality by adding the jar to my jdk/jre path.
I tried a gradle build with a "clean" jdk/jre and problem was solved