[glassfish-4.0.1] + fix glassfish issue GLASSFISH-21118
https://java.net/jira/browse/GLASSFISH-21118
"NullPointerException using https"