Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Connection closed while running specific Extract rule



While execute Business Intelligence Exchange (BIX) Extract rules (to an external database) throught agents, one of the Extract rule fails with an error. However, the same Extract rule executes correclty when executed from Pega Designer Studio.

Error Messages

"Registrations: table does not exist in sqlWhiplash". The connection is closed.

Steps to Reproduce

Run the Extract rule through an agent.

Root Cause

The BIX Extract was run to an external database every 24 hours. This made the connection stale, which resulted in the Connectionclosed exception.

Additionaly, the earlier Legacy Connection Manager was used for this external database connection. The new Connection Manager has different capabilities which prevented the exception from occurring even when Pega connected with the database after a long interval.


Perform the following local-change:

To create a datasource for the external database, and to access the external database through the datasource, perform the below steps:
  1. Update the context.xml file with the below tag

    <Resource name="jdbc/sqlPEGAWhiplash" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

    validationQuery="SELECT 1"

  2. Update the prconfig.xml file with the below tag:

    <env name="database/databases/sqlPEGAWhiplash/dataSource" value="java:comp/env/jdbc/sqlPEGAWhiplash"/>
  3. Update the web.xml file with the below tag:

    <resource-ref id="ResourceRef_11">
    <description>sqlPEGAWhiplash Datasource</description>

  4. Enure that the below JAR files are present in the Tomcat library:

    a. mssql-jdbc-7.2.1.jre8.jar
    b. sqljdbc42.jar
  5. Restart the server including the Util nodes.

Published April 25, 2020 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us