I am currently trying to get some tests run in gradle for a shared build server. I get the following error:
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager:
worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:102)
at sun.misc.Launcher.<clinit>(Launcher.java:53)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1451)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436)
The JVM commandline arguments from running with --debug are:
-DisTestMode=true
-Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager
-DtestLocators
-javaagent:../expandedArchives/org.jacoco.agent-0.7.8.jar_cbks496gfbgpke4b5ek12xen8/jacocoagent.jar=destfile=../../jacoco/testSpringContext_cnt_dmabtec.exec,append=true,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false
-Xms128m
-Dfile.encoding=US-ASCII
-Duser.country=US
-Duser.language=en
-Duser.variant
I've tried running with different versions of gradle on local and on server to compare:
2.14.1 on local vs 2.14.1 on server
4.10.1 on local vs 4.5.x on server
Does anyone have any ideas as to what is the issue? If you need more information, please ask and I will provide if I am able to. Thanks.
This occurs when ~/.gradle/daemon folder is corrupted in MacOS/Unix. Forcefully removing the daemon folder resolved the issue for me.
rm -rf ~/.gradle/daemon
Hi I could resolve my Problem with deleting the cache folder in the users home and then remove the .gradle folder in the projects folder. After that, I used gradle init and gradle wrapper to initialize it. Important I had to restart my computer (Windows) because some files in the cache folder were locked. Be sure, that everything is deleted inside the cache folder. I had some hanging gradle daemons without deleting everything.
export GRAILS_OPTS='-Xmx4g'
worked for me as charm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With