What to change if the "Test Connection" button for the User Action Log in the Spotfire Server configuration tool does nothing?

What to change if the "Test Connection" button for the User Action Log in the Spotfire Server configuration tool does nothing?

book

Article ID: KB0081624

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

When using the Spotfire Server configuration tool to set up the User Action Log, you may find that pressing the "Test Connection" button does nothing and generates no errors, even though you have:

- tested the connection to the Spotfire database from the server that hosts Spotfire Server, and verified that everything works outside of Spotfire.

- verified installation of the database schema and database tables for user action logging.

The ERROR message shown in the following extract is seen in the Spotfire Server log:

DEBUG 2014-12-18T11:28:51,803-0600 [*Initialization*] util.sql.PoolingDataSource: Destroying data source server.default[driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver, url='jdbc:sqlserver://servername:1433;DatabaseName=Spotfire_Admin;integratedSecurity=true;selectMethod=cursor', username='', password=[NOT SHOWN], kerberosLoginContextName=null, refreshTGT=false, initialized=true, destroyed=false, active=true, size=5, idleCount=5, activeCount=0, mostActiveCount=3, errorCount=0, timeoutCount=0, minConnections=5, maxConnections=40, connectionTimeout=600, poolingScheme=WAIT, loginTimeout=10, autoCommit=true, readOnly=false, mBeanEnabled=true, properties={StringInputParameterType=varchar, MaxPooledStatements=20, sendStringParametersAsUnicode=false}]

DEBUG 2014-12-18T11:28:51,803-0600 [*Initialization*] util.sql.InternalConnectionPool: Destroying internal connection pool server.default[size=5, idleCount=5, activeCount=0, minConnections=5, maxConnections=40, connectionTimeout=600, destroyed=false]
 

DEBUG 2014-12-18T11:28:51,803-0600 [*Initialization*] util.sql.InternalConnectionPool: Destroyed internal connection pool server.default[size=0, idleCount=0, activeCount=0, minConnections=5, maxConnections=40, connectionTimeout=600, destroyed=true]


ERROR 2014-12-18T11:28:51,819-0600 [*Initialization*] web.context.ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionLoggerMUX' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.spotfire.server.actionlog.ActionLoggerMUX]: Constructor threw exception; nested exception is java.lang.NullPointerException
 at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.spotfire.server.actionlog.ActionLoggerMUX]: Constructor threw exception; nested exception is java.lang.NullPointerException
 at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
 at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:108)
 at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
... 28 more
Caused by: java.lang.NullPointerException
 at com.spotfire.server.util.sql.PoolingDataSource.init(PoolingDataSource.java:362)
 at com.spotfire.server.actionlog.db.ActionDBLogger.createAndInitConnectionPool(ActionDBLogger.java:323)
 at com.spotfire.server.actionlog.db.ActionDBLogger.<init>(ActionDBLogger.java:171)
... 30 more
 

Issue/Introduction

What to change if the "Test Connection" button for the User Action Log in the Spotfire Server configuration tool does nothing?

Resolution

Export the configuration from the database into the configuration.xml file and make a backup copy of the configuration.xml file.

 

Then use a simple text editor (such as Notepad, but not WordPad) to edit the configuration.xml file:

Within the “data-source-config” section, make sure you have specified values for min-connections and max-connections:

     <min-connections>1</min-connections>
     <max-connections>4</max-connections>

Both need to be set to a value greater than zero.  

Also: if you are using Windows integrated authentication for the database, be sure to specify integratedSecurity=true in the database-url string.

Your data-source-config section will look something like this:

<data-source-config>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<database-url>jdbc:sqlserver://<my dbservername>:1433;DatabaseName=spotfire_actionlog; integratedSecurity=true</database-url>
<username><my username></username>
<password><my password></password>
<auto-commit>true</auto-commit>
<min-connections>1</min-connections>
<max-connections>4</max-connections>
<init-queries />
<connection-properties />
</data-source-config>

(Note that the example shown above is for a Spotfire Server that uses Microsoft's vendor-supplied JDBC drivers to connect to its Spotfire database, which is hosted on a Microsoft SQL Server instance that uses Windows integrated authentication, and that the entries <my dbservername>, <my username> and <my password> are placeholders for actual credentials that have not been provided in this example.)


Save the edited configuration.xml file.

Import the edited configuration.xml file into the database, then stop and re-start Spotfire Server as a Windows (or Linux) service. 

Press the "Test Connection" button to make sure you have a valid connection.