Friday, November 09, 2012

Glassfish 3.1

  • Starting the server
    • cd glassfish
    • ./bin/asadmin start-domain --verbose
  • Changing JVM options
    • Edit domains/domain1/config/domain.xml
    • For instance, add <jvm-options>-verbose:class</jvm-options>
    • (Just adding an command line parameters to the java started in bin/startserv doesn't to the trick; I suspect this is just a loader, which then starts the real VM that will host the server)
  • Glassfish key store password
    • By default, Glassfish sets the javax.net.ssl.keyStore property (in domain.xml) to point to its own key store, in config/keystore.jks
    • That key store has a password set on it, which is the same as the Glassfish master password, by default changeit
    • However, the default domain.xml doesn't set the javax.net.ssl.keyStorePassword property
    • As a result, when establishing an SSL connection, Java fails to key store, resulting in a java.security.UnrecoverableKeyException with the message Password must not be null
    • One way to solve this is to add a <jvm-options>-Djavax.net.ssl.keyStorePassword=changeit</jvm-options> in domain.xml