Configuring the web application server for your JDBC driver

The web application server where you plan to deploy Campaign must contain the correct JAR file to support JDBC connections. This enables your web application to connect to the system tables. The location of the JAR file must be included in the class path of the web application server.

If you are using WebSphere®, Weblogic, Tomcat and if you allow the installer to create the data source when you install the product, you can skip the step in this procedure about setting the classpath. To enable automatic data source creation during installation, on the Datasource Creation panel, select the Create Campaign Datasource check box and supply information about your application server. If you do not want to allow the installer to create the data source, then perform this entire procedure.

If you are using WebLogic application server you must perform this entire procedure.
  1. Consult the Recommended Software Environments and Minimum System Requirements document to determine the correct JAR file for your database type.
  2. Obtain the latest vendor-provided Type 4 JDBC driver that is supported by Unica.
    • If the driver does not exist on the machine where you plan to deploy Unica Campaign, copy the driver to any location on that machine. Unpack the driver in a path that does not include spaces.
    • If you obtain the driver from a machine where the data source client is installed, verify that the version is supported.
  3. Include the full path and file name of the driver in the classpath of the web application server where you plan to deploy Unica Campaign.
    • For all supported versions of WebLogic, set the classpath in the setDomainEnv script in the WebLogic_domain_directory/bin directory where environment variables are configured.

      The driver must be the first entry in the CLASSPATH list of values before any existing values. For example:

      UNIX

      CLASSPATH="/home/oracle/product/<version>/jdbc/lib/ojdbc8.jar:
      		${PRE_CLASSPATH}${CLASSPATHSEP}${WEBLOGIC_CLASSPATH} 
      		${CLASSPATHSEP}${POST_CLASSPATH}${CLASSPATHSEP}${WLP_POST_CLASSPATH}"
      		export CLASSPATH
      

      Windows

      set CLASSPATH=c:\oracle\jdbc\lib\ojdbc8.jar;%PRE_CLASSPATH%;
      %WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;%WLP_POST_CLASSPATH%
      
    • For all supported versions of WebSphere®, set the classpath in the Administration console when you set up the JDBC providers for the Unica products.
    • Please make a note of the database driver class path in the Campaign installation worksheet, as you must enter the path when you run the installer.
  4. Restart the web application server so your changes take effect. During startup, monitor the console log to confirm that the classpath contains the path to the database driver.

Datasource creation during installation is not supported for JBOSS application Server, so you must perform this entire procedure.

  1. Obtain the latest vendor-provided Type 4 JDBC driver for your system table database that is supported by Unica, as described in the Recommended Software Environments and Minimum System Requirements guide.
  2. Use the following guidelines after you obtain the JDBC driver.
    • If the driver does not exist on the server where you plan to deploy Campaign, obtain it and unpack it on the server. Unpack the drivers in a path that does not include spaces.
    • If you obtain the driver from a server where the data source client is installed, verify that the version is the latest supported by Campaign.
  3. Add and register the full path of the driver including the file name, to the module using below commands:
    • For all supported versions of JBoss, add the JDBC driver as module. Use the following procedure to add the JDBC driver as a module.

      For example for SQL Server:

      module add --name=com.microsoft.sqlserver.jdbc --resources=<JDBC_Driver_Location>\sqljdbc4.jar --dependencies=javax.api,javax.transaction.api
    • Register this SQL JDBC Driver using the following guidelines: For example:
      • /subsystem=datasources/jdbc-driver=sql:add(driver-module-name=com.microsoft.sqlserver.jdbc,driver-name=sql,driver-xa-datasource-class-name=com.microsoft.sqlserver.jdbc.SQLServerXADataSource)
      • /subsystem=datasources/jdbc-driver=sql:read-resource
      • /subsystem=ee/service=default-bindings:write-attribute(name=datasource, value=undefined)
  4. Make a note of the database driver class path in the Campaign installation worksheet, as you must enter the path when you run the installer.
  5. Restart the web application server so that your changes take effect. During startup, monitor the console log to confirm that the class path contains the path to the database driver.
  6. Obtain the latest vendor-provided Type 4 JDBC driver for your system table database that is supported by Unica, as described in the Recommended Software Environments and Minimum System Requirements guide.
  7. Use the following guidelines after you obtain the JDBC driver.
    • If the driver does not exist on the server where you plan to deploy Campaign, obtain it and unpack it on the server. Unpack the drivers in a path that does not include spaces.
    • If you obtain the driver from a server where the data source client is installed, verify that the version is the latest supported by Campaign.
  8. Add and register the full path of the driver including the file name, to the module using below commands:
    • For all supported versions of JBoss, add the JDBC driver as module. Use the following procedure to add the JDBC driver as a module.

      For example for SQL Server:

      module add --name=com.microsoft.sqlserver.jdbc --resources=<JDBC_Driver_Location>\sqljdbc4.jar --dependencies=javax.api,javax.transaction.api
    • Register this SQL JDBC Driver using the following guidelines: For example:
      • /subsystem=datasources/jdbc-driver=sql:add(driver-module-name=com.microsoft.sqlserver.jdbc,driver-name=sql,driver-xa-datasource-class-name=com.microsoft.sqlserver.jdbc.SQLServerXADataSource)
      • /subsystem=datasources/jdbc-driver=sql:read-resource
      • /subsystem=ee/service=default-bindings:write-attribute(name=datasource, value=undefined)
  9. Make a note of the database driver class path in the Campaign installation worksheet, as you must enter the path when you run the installer.
  10. Restart the web application server so that your changes take effect.

If you are using Apache Tomcat, you must perform this entire procedure.

  1. Obtain the latest vendor-provided Type 4 JDBC driver for your system table database that is supported by Unica, as described in the Recommended Software Environments and Minimum System Requirements guide.
  2. Use the following guidelines after you obtain the JDBC driver.
    • If the driver does not exist on the server where you plan to deploy Campaign, obtain it and unpack it on the server. Unpack the drivers in a path that does not include spaces.
    • If you obtain the driver from a server where the data source client is installed, verify that the version is the latest supported by Campaign.
  3. Copy the jar file manually to $Tomcat_Installed_Location/lib/, here $Tomcat_Installed_Location is the Tomcat root installation directory where you plan to deploy Unica Campaign.
  4. Make a note of the database driver class path in the Campaign installation worksheet, as you must enter the path when you run the installer.
  5. Restart the web application server so that your changes take effect. During startup, monitor the console log to confirm that the class path contains the path to the database driver.

Following parameters must be added in the connector in server.xml.

maxHttpHeaderSize="209715200"

maxPostSize="-1"

Details of the parameters are below:
  1. maxHttpHeaderSize

    The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 8192 (8 KB).

  2. maxPostSize

    The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than zero. If not specified, this attribute is set to 2097152 (2 megabytes). Note that the FailedRequestFilter can be used to reject requests that exceed this limit.