Category: Java

Using a pinned certificate for SSL communication

Using a pinned certificate for SSL communication can enhance security when communicating to a known service. The certificate from the server can be hard coded into a client application and used during SSL verification as an additional check. This has the drawback of requiring a client application update prior to the server certificate expiration. The …

Read More Using a pinned certificate for SSL communication

OpenJPA and MySQL Timestamps

Reading in MySQL Timestamps that default to ‘0000-00-00 00:00:00’ using JPA can result in errors if your MySQL connection is not properly configured. You may run into an exception such as this: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 5 to TIMESTAMP. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) The solution here is easy enough, …

Read More OpenJPA and MySQL Timestamps