1.0m8 causing KeyStoreException (Invalid keystore format) on OS-X while 1.0m7 works fine

1.0m7 works fine on simple build, but when I switched to 1.0m8 I get a whole pile of pain as shown by the edited stacktrace below.

(FYI I tried whacking my ~/.gradle and the projects .gradle just in case) Overall I just love gradle!!! Great job guys.

...snip...
15:54:37.458 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':compileJava'
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Failure initializing default SSL context
...snip...
* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compile'.
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:47)
...snip...
 at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
 at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: java.lang.IllegalStateException: Failure initializing default SSL context
 at org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(SSLSocketFactory.java:211)
 at org.apache.http.conn.ssl.SSLSocketFactory.<init>(SSLSocketFactory.java:333)
...snip...
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:497)
 ... 66 more
Caused by: java.security.KeyStoreException: problem accessing trust storejava.io.IOException: Invalid keystore format
 at com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:55)
 at org.apache.http.conn.ssl.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:190)

Switched back to 1.0m7 no problemo.

iMac 10.6.8

java version “1.6.0_29” Java™ SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot™ 64-Bit Server VM (build 20.4-b02-402, mixed mode)

I’m guessing this might be caused by our switch from HttpClient v3 -> v4. Any chance you can send me your complete debug logs and build file? (darrell.deboer@gradleware.com)

Thanks

Are you using the ‘–daemon’ option when running Gradle?

Luke… Nope. I did try using the Eclipse plugin at one stage and it uses the daemon. But I flip between IDEs, editors and cmd line constantly, and that caused some pain so I killed it and went back to cmd line.

I’m a bit of a dinosaur (programming since '77) and tend to gravitate back to the cmd line and vi… :slight_smile:

Daz…

I’ll put together a test case and ship it to you when I can. Since I live on the Gold Coast in Australia, we’re roughly 12hrs out of sync, so it’ll be a while…

Daz… Just sent an email (direct) with a full cmd line transcript gzipped.

Sorry - looking at your logs and at the com.sun.security source code, I can’t really tell what going wrong. It looks to me like the exception is happening when we call ‘AbstractHttpClient.getConnectionManager()’ for the first time.

If you wanted to help out further, you could try creating a simple sample application using Apache HttpClient 4.1 (http://hc.apache.org/httpcomponents-client-ga/index.html) and see if you can connect to a remote URL. That will indicate if the issue is in the way Gradle uses HttpClient, or in HttpClient itself.

Actually, check out some of these posts to see if they help:

http://stackoverflow.com/questions/1052700/java-io-ioexception-invalid-keystore-format http://stackoverflow.com/questions/126798/java-invalid-keystore-format-error http://tomcat.10.n6.nabble.com/Invalid-Keystore-Format-Exception-td2087089.html

Excellent. Thanks!

I’ve got intermittent broadband issues at home at present, but I will get to it ASAIC.