Database connection error while the CT consumer is writing to the database

Cause

This is an error that occurs when there is a disconnect between the system environment (env file) and the CT consumer. This occurs when the CT consumer fails to write to the database.

Resolution

To troubleshoot this issue, you will update the CT processor's configuration.

  1. Go to C:\Nymi\cwp\ctprocessor\config and open the context.xml file with a text editor.
  2. Comment-out the following line:
    <property name="url" value="jdbc:sqlserver://#{systemEnvironment['CT_DB_HOST']}:#{systemEnvironment['CT_DB_PORT']}" />
  3. Comment-in the following line:
    <property name="url" value="jdbc:sqlserver://#{systemEnvironment['CT_DB_HOST']}\\#{systemEnvironment['CT_DB_INSTANCE']}" />

    The new section of code should look like the following (comments excluded):

    <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
            <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
            <property name="url" value="jdbc:sqlserver://#{systemEnvironment['CT_DB_HOST']}\\#{systemEnvironment['CT_DB_INSTANCE']}" /> 
            <property name="username" value="#{systemEnvironment['CT_DB_USERNAME']}" />
            <property name="password" value="#{systemEnvironment['CT_DB_PASSWORD']}" />
            <property name="defaultCatalog" value="#{systemEnvironment['CT_DB_CATALOG']}" />
            <property name="defaultSchema" value="#{systemEnvironment['CT_DB_SCHEMA']}" />
            <property name="initialSize" value="4"></property>
            <property name="maxTotal" value="32"></property>
            <property name="maxIdle" value="8"></property>
    </bean>
  4. Re-launch the entire cluster.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share