Resolve "The SELECT permission was denied" error when starting Tomcat for EngageOne Digital Delivery

Product Feature: Installation / Upgrade

Operating System: Windows 2008 64bit

Configuration: Apache TomCat
 

Issue

Encountered this error in Tomcat / Catalina log upon startup:
 
SEVERE: Error listenerStart
08/07/2014 1:44:02 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/emessaging] startup failed due to previous errors
Caused by: java.sql.SQLException: The SELECT permission was denied on the object 'role', database 'emessaging', schema 'dbo'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418)
 
 

Cause

"Permission was denied" SQL error is generally due to insufficient database rights or permissions assigned to login / user used to connect to database.

Resolution

UPDATED: November 3, 2017
Fixed by the followings steps:
1. Login to SQL Server Management Studio using SA account > Security > Login > select the database user entered into 'Database settings' screen during emessaging installation > right click and go to Properties.
2. Under User Mappings page, please make sure that:
 a. emessaging database is ticked.
 b. 'Users = dbo' & 'Schema = dbo'.
 c. Under Database role memberships, make sure db_owner and public are selected.
3. Under Server Roles page, make sure sysadmin & public are selected.