Digital repositories Linux

Database class missing following DSpace upgrade from 7.2 to 7.3

The following error might occur after the upgrade if you have specified the db.dialect option in your local.cfg or dspace.cfg file from version 7.2 and did not make the requisite change for 7.3:

Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.dspace.storage.rdbms.hibernate.postgres.DSpacePostgreSQL82Dialect
        at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:210) ~[hibernate-core-5.6.5.Final.jar:5.6.5.Final]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]

The offending line in the configuration is as follows:

db.dialect = org.dspace.storage.rdbms.hibernate.postgres.DSpacePostgreSQL82Dialect

Change that to:

db.dialect = org.hibernate.dialect.PostgreSQL94Dialect

And restart the Tomcat servlet container:

sudo systemctl restart tomcat9