Hello,
unfortunately my update to 12.5 gives errors. See .txt.
Server Debian 9.
xwiki-12.5-log.txt (60.4 KB)
Hello,
unfortunately my update to 12.5 gives errors. See .txt.
Server Debian 9.
xwiki-12.5-log.txt (60.4 KB)
Yes sorry about that. This is Loading....
Unfortunately there is a regression in the MySQL connector which does not understand timezones like “CEST”, what you can do in the meantime is either:
<property name="hibernate.connection.url">
valueNote: I’m not sure they consider it a regression. See https://bugs.mysql.com/bug.php?id=85816 and especially https://bugs.mysql.com/bug.php?id=85816#c484051
It’s just that MySQL 8 has dropped the legacy support for the useLegacyDatetimeCode
property.
Note: it’s now documented in 2 places:
hi folks,
adding the string like &serverTimezone=Europe/Berlin
did not work for me. I got an error message which said that an other charactor was expected.
Adding this to the other properties worked like a charm - and is perhaps easier as setting a different mysql timezone:
<property name="hibernate.connection.serverTimezone">Europe/Berlin</property>
Thanks, I’ve added this to https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationMySQL/#HMySQL8
Indeed I forgot to indicate that “&” needs to be escaped in that file.
Thanks for the Solution! Now i have my 12.5!
Ubuntu 12.5.1 packages are still non-functional as distributed, using the “package maintaner’s version” of hibernate.cfg.xml
. Same basic errors as posted above, web displays a blank page.
Following the advice in this thread did fix the problem. To be clear what fixed the problem was adding the following line to the hibernate.cfg.xml
:
<property name="hibernate.connection.serverTimezone">Etc/UTC</property>
It is important to note here that the timezone set here needs to match the timezone of MySQL / the database and probably the system. So a few helpful commands:
Finding the MySQL timezone: select @@global.time_zone;
$ mysql -u root -p -e "select @@global.time_zone\G"
*************************** 1. row ***************************
@@global.time_zone: SYSTEM
Finding the system timezone: timedatectl
$ timedatectl
Local time: Mon 2020-07-06 20:12:34 UTC
Universal time: Mon 2020-07-06 20:12:34 UTC
RTC time: Mon 2020-07-06 20:12:34
Time zone: Etc/UTC (UTC, +0000)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
Question: where would one set the value for &serverTimezone=${timezone}
? If one were to attempt to use that mechanism to configure the timezone?
Indeed there is a bug in this version, the & is not escaped (should be &
) in the “hibernate.connection.url” property. Fixing that and publishing a new build.
Great! Thanks for the update. I’ll try things out with the &
@jwielsch I see, so you replace ${timezone}
with the timezone you wish to use. That format, ${timezone}
, looks like a template replacement variable, so I was thinking maybe you could set this in another configuration file somewhere. Although if you could do that, you wouldn’t need to put the database username and password directly in this file.
It is. ${timezone} is replaced by the timezone from the JVM (a format the MySQL connector understand well).
Yes excellent, this worked out-of-the-box:
<property name="hibernate.connection.url">jdbc:mysql://localhost/xwiki?useSSL=false&serverTimezone=${timezone}</property>
Thanks for the clarification.