Premium Feature — Available in the Professional and Enterprise Editions of LabKey Server. Also available as an Add-on to the Starter Edition. Learn more or contact LabKey.

LabKey's JDBC driver allows Spotfire to query the server and use the results to build visualizations and perform other Spotfire analysis.

Set Up

To configure Spotfire to use the LabKey JDBC driver, do the following:

  • Obtain the LabKey JDBC driver jar from your server.
  • Copy the LabKey JDBC driver jar to the appropriate location on the Spotfire Server.
    • Starting with Spotfire Server 10.3, the driver should be placed in the following directory, to ensure that the files are handled properly by the Spotfire Server Upgrade Tool:
    • On earlier versions of Spotfire, you may have placed the driver in the directory:
    • If files are placed in this "lib" (or another) directory, then you will have to manually move them during an upgrade.
    • For any version, if you encounter problems such as "The information link cannot be loaded from the server", trying the other folder location may resolve the problem.

  • Launch the Spotfire Server Configuration Tool.
  • Click the Configuration tab.
  • On the lefthand pane click DataSource Templates.
  • Add a new LabKey data source using the following template. Learn about the connection-url-pattern below.

For more details, see the Spotfire documentation:


The connection URL pattern includes your HOST and PORT, as well as a CONTEXT_PATH if needed (uncommon). The folder path on LabKey Server will be appended to this connection URL pattern.

For example, the connection URL line might look like:


Applying Folder Filters

To control what folders and subfolders of data will be queried, limiting (or expanding) the scope of data included in Spotfire visualizations, apply a container filter. Include a <connection-property> key-value pair in your XML configuration similar to this:


Possible values for the containerFilter parameter are:

  • Current (Default)
  • CurrentAndSubfolders
  • CurrentPlusProject
  • CurrentAndParents
  • CurrentPlusProjectAndShared
  • AllFolders
Learn more about using folder filters in this topic: filterbyfolder.

Using LabKey Data

  • In the Spotfire Information Designer add a data source of type 'labkey'. (Once you have successfully added the driver above, 'labkey' will be available in the Type dropdown.
  • You must also provide a Connection URL, Username, and Password. See an example screen shot below.
  • Now you will be able to see the LabKey Server folder hierarchy and exposed schemas.


In your Spotfire Server, you can add additional logging at these levels:

  • org.labkey.jdbc.level = FINE (Provides java.util.logging levels)
  • org.labkey.jdbc.level = DEBUG (Provides log4j or slf4j logging levels)
These will result in logging into the stderr log file appender.

Spotfire versions 7.9 and above use the log4j2 logging framework. This property should be set in the [Spotfire_Server_installation_dir]/tomcat/spotfire-config/log4j2.xml file. Generally there will already be a <Loggers> section in this file to which you can add:

<Logger name="org.labkey.jdbc.level" level="DEBUG"/>

In older versions of Spotfire prior to 7.9, loggers would have been included in a .properties file . Instructions for migrating a customized .properties file to the new format are available here:


If you have difficulties connecting to LabKey from Spotfire, first check the installation instructions in this topic and in LabKey JDBC Driver to ensure the properties and settings are configured correctly.

Additional troubleshooting steps:

  • Confirm that the user account connecting from Spotfire can independently access the desired resources on LabKey Server directly.
  • Try accessing the same resources from Spotfire using a user account with site administrator access. If this works and the intended user does not, you may need to temporarily increase the account's permissions, or obtain an updated JDBC driver.
  • Check the ViewServlet and HTTP access logs for errors.
  • Review the Spotfire Server logs for errors.
  • Try setting DEBUG logging on and retrying the connection.

Related Topics

Premium Resource Available

Subscribers to premium editions of LabKey Server can learn more with the example code in this topic:

Learn more about premium editions

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all