This is how my connection is set:
Connection conn = DriverManager.getConnection(url + dbName + \"?useUnicode=true&characterEncoding=utf-8\", userName, password
I also had to drop and re-create all the database’s stored procedures (and functions too) in order that they execute within the new character set of utf8mb4.
Run:
SHOW PROCEDURE STATUS;
…to see which procedures have not been updated to the server’s new character_set_client, collation_connection and Database Collation values.