XWiki LTS 16.10 -> 17.10 Debian Jetty Package Upgrade

While attempting to update to 16.10.16, I accidentally updated to 17.10.2, because 16.10.16 was not in the LTS repository any more, and thus my apt pin failed. Whoops.

I might have preponed the upgrade to 17.10.2 due to this, bug the problem is, I couldn’t get it to work.

While 16.10.x updates are always flawless, after the 17.10.2 upgrade the Xwiki server started and reported success in the jetty log (`Server gestartet, können Sie nun http://collab.example.com:1234/ in Ihrem Browser öffnen, um auf Ihr Wiki zuzugreifen`). However when accessing this page, any attempt to connect to the DB failed:

2026-01-08 22:41:47,029 [XWiki initialization] INFO  .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled 
2026-01-08 22:41:47,149 [XWiki initialization] INFO  .HibernateDataMigrationManager - The following data migration(s) will be applied for wiki [xwiki] currently in version [160500000]: 
2026-01-08 22:41:47,149 [XWiki initialization] INFO  .HibernateDataMigrationManager -   R170400000XWIKI23160 - Cleanup XWikiProperties fields used as templates when they match the default values. 
2026-01-08 22:41:47,150 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 
2026-01-08 22:41:47,315 [XWiki initialization] WARN  o.m.j.m.s.ErrorPacket          - Error: 1227-42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation 
2026-01-08 22:41:47,317 [XWiki initialization] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: 1227, SQLState: 42000 
2026-01-08 22:41:47,317 [XWiki initialization] ERROR o.h.e.j.s.SqlExceptionHelper   - (conn=117468) Access denied; you need (at least one of) the PROCESS privilege(s) for this operation 
2026-01-08 22:41:47,323 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xwiki]... 
com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki [xwiki]
(...)
Caused by: java.sql.SQLSyntaxErrorException: (conn=117468) Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
        at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:309)
        at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:403)
        at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:196)
        at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:1411)
        at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:1350)
        at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:1269)
        at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:1193)
        at org.mariadb.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:91)
        at org.mariadb.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:290)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:123)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
        ... 57 common frames omitted

As far as I can tell, there were no merge errors in the DB config (`xwiki.cfg` and/or `hibernate.cfg.xml`).

XWiki Jetty Debian packages from XWiki SAS, MariaDB as DBMS.

I even enhanced my XWiki DB user’s permissions to `GRANT ALL TO …` in order to resolve the error, with no changes.

Fortunately, the failure was so complete that it wasn’t able to touch the schema - so I was able to downgrade XWiki to 16.10.16, and it immediately worked again like a charm.

I browsed through the upgrade documentation, but wasn’t able to immediately identify what I missed. Before spending hours on debugging, I thought that maybe someone already managed to resolve this or otherwise has an idea what may have changed in XWiki 17.10 which I need to consider to successfully upgrade…

Thanks a lot in advance, pointers to relevant documentation are also highly welcome.

Which Debian package are you using ? xwiki-xjetty-mariadb ?

There should not be much different between 17.10.2 and 16.10.16 at this level, except possibly a different version of the DB connector, which might have some regression. We upgraded myxwiki.org and xwiki.org to 17.10.2 Debian package (Tomcat here and not XJetty, but should not have any impact for the database side of things, which is provided by the same Debian package) and they are working fine.

It could be interesting to check the /etc/xwiki/hibernate.cfg.xml file you end up with after the upgrade, to see if it’s not broken in some way (maybe you customized it and the merge did not go well).

@tmortagne: I use the following packages:

# dpkg -l | egrep xwiki
ii  xwiki-common                            16.10.16                             all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-mariadb-common                    16.10.16                             all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-xjetty-common                     16.10.16                             all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-xjetty-mariadb                    16.10.16                             all          XWiki is a free wiki software platform written in Java with a design emphasis
#

Regarding the hibernate.cfg.xml, IIRC it was merged, but successfully by Debian’s 3-way-config-file merge during installation, and it didn’t “look” broken to me (I check config files after merge operations).

However, I’ll retry the upgrade, possibly on the weekend, and keep an extra eye on the DB configuration to see why it’s using the default XWiki DB name instead of the correct name configured by us.

Maybe something still went wrong with config file merge after all…

Are you saying that the root problem is that it’s trying to access the database xwiki ? It’s not really explicit in your first message.

In theory this is controlled by both the connection URL in /etc/xwiki/hibernate.conf.xml and the property xwiki.db in /etc/xwiki/xwiki.cfg and if all that is correct then maybe there is a regression we did notice yet (custom main wiki database is not something which is done that much).

@tmortagne: Ah, sorry - I meanwhile also asked through a support ticket via our bronce support contract, referring to this posting, and they noticed that the logs didn’t match the DB name I had given them.

I thought you were made aware of this posting by your support team member, so didn’t explicitly mention it here, but maybe this was just a coincidence.

So, yes, apparently XWiki 17.10 tries to use the wrong DB name, which indeed will lead to this error as the (also custom-named) XWiki DB user has full permission on our actual XWiki database, but not on the (non existing) database called `xwiki`.

I’ll try to cross check on the weekend if it’s really a configuration problem on my side, or if XWiki tries to use the `xwiki` database even though it’s configured differently. In the latter case I’ll open a Jira bugreport.

2 Likes