org.sql2o.Sql2oException: Could not acquire a connection from DataSource - The server time zone value 'MSK' 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.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by fromgate
, 1 year ago
Could not acquire a connection from DataSource - The server time zone value 'MSK' 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.
via Stack Overflow by Jake Kaad
, 2 years ago
Could not acquire a connection from DataSource - FATAL: invalid value for parameter "TimeZone": "America/Los_Angeles"
org.sql2o.Sql2oException: Could not acquire a connection from DataSource - The server time zone value 'MSK' 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.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:54)
at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
at com.mysql.cj.jdbc.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:118)
at com.mysql.cj.mysqla.MysqlaSession.configureTimezone(MysqlaSession.java:308)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:2474)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1817)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1673)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:656)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:349)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:221)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.sql2o.GenericDatasource.getConnection(GenericDatasource.java:62)
at org.sql2o.Connection.createConnection(Connection.java:288)
at org.sql2o.Connection.(Connection.java:51)
at org.sql2o.Sql2o.open(Sql2o.java:225)
at ru.nukkit.test.Test.onCommand(Test.java:104)
at cn.nukkit.command.PluginCommand.execute(PluginCommand.java:33)
at cn.nukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:193)
at cn.nukkit.Server.dispatchCommand(Server.java:630)
at cn.nukkit.command.CommandReader.run(CommandReader.java:70)

Users with the same issue

4 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
5 times, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.