I have avoided this error (Java 1.6.0 on OSX 10.5.8) by putting a dummy cert in the keystore, such as
keytool -genkey -alias foo -keystore cacerts -dname cn=test -storepass changeit -keypass changeit
Surely the question should be "Why can't java handle an empty trustStore?"