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


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.


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="" />
            <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>
  4. Re-launch the entire cluster.

Articles in this section

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