After a Server restart, UVMS can no longer be started.
In uvserver.log we find the following kind of errors:
|ERROR| main | org.hibernate.util.JDBCExceptionReporter | An SQL data change is not permitted for a read-only connection, user or database.
|ERROR| main | com.orsyp.central.aspect.DataAccessExceptionTranslator | org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
In derby.log we find the word "READ ONLY" as follows:
on database directory /uvmsfolder/data/data/uvmsdb in READ ONLY mode with class loader [email protected]
Upon server restart, startup scripts launched UVMS with the wrong user (root) instead of the UVMS user.
This caused the Derby database to start as root modifying the owner of the dbex.lck and db.lck files inside data/data/uvmsdb to the user root.
The regular uvms user could only start Derby in Read Only Mode.
Release : 6.x
Component : Univiewer Management Server
In order to fix the issue you will need to restore the permissions of the whole Derby Database to the correct user.
chown -R uvmsadmin:uvmsgroup uvmsdb
Then start UVMS with the correct user (uvmsadmin).