UVMS: Impossible to start - "An SQL data change is not permitted"
searchcancel
UVMS: Impossible to start - "An SQL data change is not permitted"
book
Article ID: 144537
calendar_today
Updated On: 02-09-2024
Products
CA Automic Dollar Universe
Issue/Introduction
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 sun.misc.Launcher$AppClassLoader@5c647e05
Environment
OS: Linux Release : 6.x Component : Univiewer Management Server
Cause
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.
Resolution
In order to fix the issue you will need to restore the permissions of the whole Derby Database to the correct user. For example:
cd /uvms_folder/data/data/ chown -R uvmsadmin:uvmsgroup uvmsdb
Then start UVMS with the correct user (uvmsadmin).