Failure initializing default system SSL context

apple iMac:menus jim$ java -version java version “1.5.0_30” Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03-389-9M3425) Java HotSpot™ Client VM (build 1.5.0_30-161, mixed mode, sharing)

apple iMac:menus jim$ gradle run The groovy configuration has been deprecated and is scheduled to be removed in Gradle 2.0. Typically, usages of ‘groovy’ can simply be replaced with ‘compile’. In some cases, it may be necessary to additionally configure the ‘groovyClasspath’ property of GroovyCompile and Groovydoc tasks. main test workingDir is /Volumes/Media1/Software/menus project is named :root project ‘menus’ :compileJava UP-TO-DATE :compileGroovy

FAILURE: Build failed with an exception.

  • What went wrong: Could not resolve all dependencies for configuration ‘:compile’. > Could not resolve org.codehaus.groovy:groovy-all:2.1.4.

Required by:

:menus:1.0

Failure initializing default system SSL context

Failure initializing default system SSL context > Could not resolve org.apache.ivy:ivy:2.2.0.

Required by:

:menus:1.0

Failure initializing default system SSL context

Failure initializing default system SSL context

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 26.964 secs iMac:menus jim$ gradle -v

------------------------------------------------------------ Gradle 1.6 ------------------------------------------------------------

Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.4 compiled on May 22 2012 Ivy: 2.2.0 JVM: 1.5.0_30 (Apple Inc. 1.5.0_30-161) OS: Mac OS X 10.5.8 ppc

// ------------------------------------- with no other changes, my gradle build works ok with versions 1.0 and 1.1 but any version after 1.1 fails with this SSL issue. so i cannot upgrade to 1.2 or 1.3 or 1.4 or 1.6 cos i tried them and they all give same failure. Any suggestions ?

Can you show the relevant parts of the build script (e.g. repository declarations) and the stack trace (’-s’)? Please wrap all output with HTML code tags. Can you try with a new JDK installation?

ran again with --debug and found this little gem: missing cacerts, see below

2:34:15.273 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
22:34:15.278 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
22:34:15.279 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
22:34:15.281 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.FileNotFoundException: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/security/cacerts (No such file or directory)
22:34:15.284 [ERROR] [org.gradle.BuildExceptionReporter]
at java.io.FileInputStream.open(Native Method)
22:34:15.285 [ERROR] [org.gradle.BuildExceptionReporter]
at java.io.FileInputStream.<init>(FileInputStream.java:106)
22:34:15.286 [ERROR] [org.gradle.BuildExceptionReporter]
at org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:299)
22:34:15.288 [ERROR] [org.gradle.BuildExceptionReporter]
at org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:366)
22:34:15.289 [ERROR] [org.gradle.BuildExceptionReporter]
... 147 more
22:34:15.296 [ERROR] [org.gradle.BuildExceptionReporter]
 22:34:15.297 [LIFECYCLE] [org.gradle.BuildResultLogger]
 22:34:15.298 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
22:34:15.299 [LIFECYCLE] [org.gradle.BuildResultLogger]
 22:34:15.311 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 43.481 secs
22:34:15.317 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (/Volumes/Media1/Software/menus/.gradle/1.6/taskArtifacts/taskArtifacts.bin)
22:34:15.319 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFileStates.bin (/Volumes/Media1/Software/menus/.gradle/1.6/taskArtifacts/outputFileStates.bin)
22:34:15.320 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task artifact state cache (/Volumes/Media1/Software/menus/.gradle/1.6/taskArtifacts).
22:34:15.334 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/Volumes/Media1/Software/menus/build.gradle' (/Volumes/Media/Users/jim/.gradle/caches/1.6/scripts/build_40mg54udnuecheh07rkjmlau14/ProjectScript/no_buildscript).

so i’m thinking i’ll try to find a cacerts from somewhere and fix this before trying again. Makes me think there was a change in security post gradle 1.1 as it works wonderfully for 1.0 and 1.1

Looks like the Apache HttpClient library used by Gradle doesn’t find the CA certificate store of your JDK. Not sure why it wouldn’t be there. You could either try to get hold of the file or reinstall the JDK.

and the answer is: a logical ‘cacerts’ pointing to a blackhole where it used to be ! So lucky me had a macbook with java 1.6 and a cacerts file that i copied back to my iMac in place of the link. and huston, we have lift off ! had already installed gradle 1.6 so ran that first, then changed build file to use wrapper version 1.6, ran that and it pulled down the 1.6 wrapper which now works fine. see below. Thank you. Pls see photo of your reward below, which of course, i consumed on your behalf, and i can now tell you how much you enjoyed it !

Groovy Version: 2.1.4 JVM: 1.5.0_30 Vendor: Apple Inc. OS: Mac OS X
iMac:menus jim$ gradle -v
  ------------------------------------------------------------
Gradle 1.6
------------------------------------------------------------
  Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.5.0_30 (Apple Inc. 1.5.0_30-161)
OS: Mac OS X 10.5.8 ppc
  iMac:menus jim$ pwd
/Volumes/Media1/Software/menus
iMac:menus jim$ open -e build.gradle
 iMac:menus jim$ gradle wrapper
The groovy configuration has been deprecated and is scheduled to be removed in Gradle 2.0. Typically, usages of 'groovy' can simply be replaced with 'compile'. In some cases, it may be necessary to additionally configure the 'groovyClasspath' property of GroovyCompile and Groovydoc tasks.
main
test
workingDir is /Volumes/Media1/Software/menus
project is named :root project 'menus'
project.buildDir:/Volumes/Media1/Software/menus/build
MouselessMenus-core-0.1.zip
MouselessMenus-core-0.12.zip
MouselessMenus-core-0.13-src.zip
build/distributions
build/distributions/MouselessMenus-core-0.1.zip
build/distributions
build/distributions/MouselessMenus-core-0.12.zip
:wrapper
  BUILD SUCCESSFUL
  Total time: 34.301 secs
iMac:menus jim$ gradlew -v
Downloading http://services.gradle.org/distributions/gradle-1.6-bin.zip
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /Volumes/Media/Users/jim/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /Volumes/Media/Users/jim/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Set executable permissions for: /Volumes/Media/Users/jim/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6/bin/gradle
  ------------------------------------------------------------
Gradle 1.6
------------------------------------------------------------
  Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.5.0_30 (Apple Inc. 1.5.0_30-161)
OS: Mac OS X 10.5.8 ppc

We have this too, but only sometimes. We use the parallel build feature of Gradle.