Missing "hibernate.cfg.xml" file

I’m trying to set up XWiki for use with an external PostgreSQL database, using Ubuntu 18.04.

I’ve followed the instructions in https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/ and installed xwiki-tomcat9-common.

However, there is no /etc/xwiki/hibernate.cfg.xml for me to edit to configure the database information.

Is there a template copy I can use somewhere?


That’s not that the instruction indicates in https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HUsingPostgreSQL. As indicated at the beginning of this page what you installed is the XWiki application and the integration with Tomcat but without the database setup (usually because you want something else than the proposed integrations or your database is in a different server).

I should have been clearer - when I said “external PostgreSQL database”, I meant not on the same server as XWiki.

That’s why I picked xwiki-tomcat9-common because to pick xwiki-tomcat9-pgsql results in installing a local copy of PostgreSQL, which is not what I want.

In the meantime, I’ve managed to get the missing hibernate.cfg.xml from the WAR file … but I see no reason why it isn’t included in the -common DEB.

Each database package generate a pre configured hibernate file and if xwiki-tomcat9-common was also providing one it would cause a conflict. Maybe a better solution would be something like a new xwiki-tomcat9-external package which expose a form to generate a proper hibernate.cfg.xml.

Thank you for explaining that.

Another alternative solution would be to include, say, hibernate.cfg.xml.example or something similarly named within xwiki-tomcat9-common? That would avoid the need for another package whilst providing at least easier access to a file that could be used?

Anyway, at least I better understand the situation now, so thanks.

Don’t hesitate the create an issue on https://jira.xwiki.org/browse/XWIKI with the ideas you have so that it’s not forgotten.

I’ve added it as a comment to https://jira.xwiki.org/browse/XWIKI-15999 which already existed regarding the missing file.

Thank you for your help.