Trouble upgrading from v9 to latest

I’m trying to upgrade to the latest version via the docker route. I’ve followed the instructions here but I get 500 error. I’m stumped.
Stack trace

I have also added xwiki.db=dbname to xwiki.cfg

Reading the stack trace it suggests that it can’t find the postgres driver. I have gone into the container and run sudo apt-get install libpostgresql-jdbc-java-doc libpostgresql-jdbc-java

What is it that I am doing wrong? I have run out of ideas.

java.lang.ClassNotFoundException: org.postgresql.Driver

So this means you’re doing something weird and not good when you’re upgrading… The JDBC driver is in the docker image so it means that you’re probably moving from one DB to another. Is that so?

Could you explain exactly how you’re upgrading the detailed list of steps you took?


Hi, I’m not intentionally moving db. I have xwiki 9 working in a web and db container, I stop the web container, switch the image to use xwiki:latest (obtained using docker pull xwiki) and then I start up the web container and copy the xwiki.cfg and hibernate.cfg.xml from the old container to the new one. I’ve also tried not copying these files and it stills give me the same error.

Hi, you need to provide more details (the command lines you use and especially the 2 image names you’ve used) because I don’t see how this is possible. You also need to explain any change you may have made to the hibernate.cfg.xml file before and for the upgrade, if any.


Hello, thank you for the help. I have managed to resolve this by running the following commands in the web container:
apt-get update && apt-get install libpostgresql-jdbc-java
cp /usr/share/java/postgresql-jdbc4.jar /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/

The image I was using for my web container was obtained with the following:
docker pull xwiki
I used the xwiki:latest for my web container.

That"s not the good solution :slight_smile:

Also it’s not possible that it was working before. It just means you’re using the MySQL image for XWiki when what you want is the PostgreSQL one… See the existing tags at

“xwiki:latest” is for mysql.

You can also simply follow the instructions at GitHub - xwiki/xwiki-docker: Dockerfile to build and run XWiki on docker :slight_smile: See the “Starting XWiki” subsection…