Working on a school project and attempting to set up a JSF with Glassfish. Went through the motions of installing Glassfish, enabling it in Netbeans, and then installing the
Ran into the same problem, changed the server to Apache, running fine now.
The reason I found is I was using Glassfish 4.2.1, and MYSQL 8.0 (Which now has caching_sha2_password) which is not compatible with each other.
Either Update your Glassfish version or move to apache