Product: TIBCO Spotfire®
Error creating bean with name 'oauthManager' defined in ServletContext resource
During Spotfire Server installation, the server might not come up as a result of the following error in catalina log.
ERROR 2017-09-13T06:02:22,396+0200 [*Initialization*] web.context.ContextLoader: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bearerTokenAuthenticator' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'oauthManager' while setting constructor argument; nested exception is org.springframework.beans.factory. BeanCreationException: Error creating bean with name 'oauthManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans. BeanInstantiationException: Failed to instantiate [com.spotfire.server.security.oauth.OAuthManager]: Constructor threw exception; nested exception is java.lang.NullPointerException
This could be due to the following reasons combined together:
- SQL server is set for Integrated Authentication.
- When the Spotfire database was created, the username that was used to log in to the database server did not have Database Owner permissions. As a result, some of the tables in the created Spotfire Database would be under local user schema and not under DBO schema. This is shown below:
To resolve this issue, the database needs to be recreated. Ensure that user logged in to the database server while creating the Spotfire database has Database Owner (DBO) permission or the user is a part of Database Administrator group.
Note: If the schema of those tables created under local user schema is changed to DBO manually, the server will start fine but after logging in to Spotfire, the users will not see any options in the UI because the user will not have required license/permissions. This is because the tables were initially created under a non Database owner schema. Doc: Setting up the Spotfire database (SQL Server with Integrated Windows authentication)