Problem

In einigen Umgebungen kann es sein, dass der MySQL Datenbanktreiber die Zeitzone des MySQL Servers nicht erkennt. Die Fehlermeldung sieht so oder so ähnlich aus:


org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
java.sql.SQLException: The server time zone value 'Mitteleuropäische Sommerzeit' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Lösung

Editieren Sie das conf/context.xml auf dem Tomcat Server und ergänzen Sie alle <resource> Elemente um «serverTimezone=Europe/Berlin» , also z.B.

url="jdbc:mysql://localhost:3306/goco?allowPublicKeyRetrieval=true&amp;useSSL=false&amp;serverTimezone=Europe/Berlin"

Verwandte Seiten