Live Forms v8.0 is no longer supported. Please visit Live Forms Latest for our current Cloud Release. Earlier documentation is available too.

Database Connector Upgrade Guide



This page describes how to upgrade your Database Connector to the latest released version of the Database Connector that is compatible with this version of . This upgrade requires you to move your datasource configuration out of configuration.xml and into the <frevvo-home>\tomcat\conf\dbconnector.properties file.

frevvo only supports/certifies the Database Connector running in the Apache Tomcat container. Refer to our Supported Platforms for the list of Application Servers and databases supported/certified by frevvo.

 Click to review the release notes compatibility matrix before continuing.


Database ConnectorLive Forms
v2.5.6Deployed to v8.0 in cloud, v.7.4.8+ for in-house
v2.5.5v7.4.x
v2.5.43v7.4.x
v2.5.32v7.3.2+
v2.5.21v7.2.x2
v2.4 Any version prior to v7.2.0
  1. If you are running Database Connector v2.5.0 - v2.5.2 you must upgrade to v2.5.3+ due to issues solved in 2.5.3.

  2. In order to run the Database Connector v2.5.3 you must upgrade to  v7.3.2+. v2.5.3 was not certified with earlier versions.
  3. In order to run the Database Connector v2.5.4 you must upgrade to v7.4.x. v2.5.4 was not certified with earlier versions.

frevvo only supports/certifies the Database Connector running in the Apache Tomcat container. Refer to our Supported Platforms for the list of Application Servers and databases supported/certified by frevvo.

 On This Page:

Migration Steps - Tomcat Bundle

  1. Stop
  2. Create a folder named <frevvo-home>\config i.e. c:\frevvo\config. Copy your configuration.xml to this location
  3. Locate & Delete your previous database resource definition(s)
    1. Edit configuration.xml
    2. Delete all lines between and including <resource-def></resource-def> for all querysets

      To help locate this, here is a example of a Datasource definition in configuration.xml

      <resource-def>
          <url>YOUR database Url HERE</url>   
          <driver>YOUR driver HERE</driver>
          <user>YOUR database user HERE</user>
          <password>YOUR password HERE</password>
      </resource-def>
    3. Delete all lines between and including <resource-ref></resource-ref>. You would have <resource-ref> definitions in your configuration.xml if you chose to define the database connection in the application container (Tomcat if you are using the frevvo-tomcat bundle) instead of inside the database connector.

      To help locate this, here is an example of a Datasource definition using <resource-ref>.

      <resource-ref>
          <description>MySQL Customers</description>
          <res-ref-name>jdbc/mystore_ds</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
    4. Remove the queryset attributes for date/dateTime/timestamp formats from all querysets. It is no longer necessary to add them. Refer to Defining SQL Queries - Dates andTime stamps for more information
      Here is an example:

      <queryset name="myStore" timeStampFormat="yyyy-MM-dd HH:mm:ss" dateFormat="yyyy-MM-dd" xmlDateFormat="yyyy-MM-dd">
      
      Should be
      <queryset name="myStore">
  4. Setup your v2.5.3+ database resource definition(s)
    1. Create <frevvo-home>\tomcat\conf\dbconnector.properties (if it does not already exist in your v7.3.2 frevvo server)
    2. For each deleted <resource-def> lines, Add these lines

      dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database>
      dbconnector.queryset@<your queryset name>.resource-def.user=<your database username>
      dbconnector.queryset@<your queryset name>.resource-def.password=<your database password>
    3. For each deleted <resource-ref> lines, Add this line

      dbconnector.queryset@mystore.resource-ref.name=jdbc/<name of your resource>
       Click here for more information

      If you prefer to define your datasources on the container level, the recommended approach is to define the datasource in the container and then use a resource-ref in the Database Connector properties file to reference it..  

      Using <Resource-ref> to define datasources is not supported if you are running the Database Connector in Standalone mode. Use <Resource-def> instead.

      Follow these steps:

      1. Edit the <frevvo-home>\tomcat\conf\Catalina\localhost\context.xml.default file 

               a,  Add the Resource name parameter. An example is shown below:

      <Resource name="jdbc/<your database name>"
                auth="Container"         
                driverClassName="com.mysql.jdbc.Driver"
                username="<your database user>"
                password="<your database password>"
                type="javax.sql.DataSource"
                url="jdbc:mysql://localhost/<your queryset name>?autoconnect=true"/>

      2. Edit frevvo\tomcat\conf\dbconnector.properties file. Verify that the frevvo.connectors.database.configuration property has been set and add the dbconnector.resource-ref.name property as shown below:

      dbconnector.queryset@<queryset name>.resource-ref.name=jdbc/<name of your resource>

      .

  5. Copy the sample frevvo.connectors.database.configuration property and add it to the dbconnector.properties file.

  6. Edit the frevvo.connectors.database.configuration line to be the path to your configuration.xml file.

    Sample frevvo.connector.datqbase.configuration property
    frevvo.connectors.database.configuration=file:///C:/frevvo/config/configuration.xml
    
    dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database>
    dbconnector.queryset@<your queryset name>.resource-def.user=<your database username>
    dbconnector.queryset@<your queryset name>.resource-def.password=<your database password
  7. Start Live Forms
  8. Browse http:<your server>:<port>/database/status Verify that the query validation page is loaded with status Passed


  9.  Log into your tenant  and test your forms and flows that interact with your database.

Migration Steps - Standalone

  1. Stop the Standalone Database Connector. 
  2. Locate & Delete your previous database resource definition(s)
    1. Edit configuration.xml
    2. Delete all lines between and including <resource-def></resource-def> for all querysets

      To help locate this, here is a example of a Datasource definition in configuration.xml

      <resource-def>
          <url>YOUR database Url HERE</url>   
          <driver>YOUR driver HERE</driver>
          <user>YOUR database user HERE</user>
          <password>YOUR password HERE</password>
      </resource-def>

      The use of <resource-ref> definitions is NOT supported when running the Database Connector in standalone mode

  3. Setup your v2.5.3+ database resource definition(s)
    1. Edit the <db-home>\database-connector-2.5.x\conf\dbconnector.properties file
    2. For each deleted <resource-def> lines, Add these lines

      # Customize the DbConnector here
      logging.file=./logs/database-connector.%d{yyyy-MM-dd}.log
      server.port=8081
      
      dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database>
      dbconnector.queryset@<your queryset name>.resource-def.user=<your database username>
      dbconnector.queryset@<your queryset name>.resource-def.password=<your database password>
    3. Remove the queryset attributes for date/dateTime/timestamp formats from all querysets. It is no longer necessary to add them. Refer to Defining SQL Queries - Dates andTime stamps for more information
      Here is an example:

      <queryset name="myStore" timeStampFormat="yyyy-MM-dd HH:mm:ss" dateFormat="yyyy-MM-dd" xmlDateFormat="yyyy-MM-dd">
      
      Should be
      <queryset name="myStore">
  4. Copy the modified configuration.xml file to the <db-home>\database-connector-2.5.x\config .
  5. Copy the JDBC driver for your database into <db-home>\database-connector-2.5.x\lib. Remember the MSSQL driver is included in the standalone database war

  6. Restart the connector using one of these methods:

    • Method 1: Using java in a command window
      1. Navigate to <db-home>\database-connector-2.5.x .Type java -jar database.war
    • Method 2: for Windows OS
      1. Double click the <db-home>\database-connector-2.5.x\Install-Service.bat file to install the connector as a Windows service. Click the Start-DBConnector-Service.bat file to start it

         Click to see standalone bundle content details

        The Standalone Database Connector bundle includes the files shown in the image:

        Note the files in the database-connector-2.5.x directory that are used to manage the Database Connector as services on *nix and Windows operating systems: These files should be run as an administrator.

        • Install-Service.bat - installs the Database Connector on a Windows system as a service named frevvo Database Connector.

        • Uninstall-service.bat - uninstalls the frevvo Database Connector on a Windows operating system

        • Start-DB Connector-Service.bat - starts the frevvo Database Connector on a Windows operating system

        • Start-DBConnector.sh - starts the frevvo Database Connector as a *nix console instance.

        • Restart-DBConnector-Service.bat - restarts the frevvo Database Connector on a Windows operating system

        • Restart-DBConnector.sh - restarts the frevvo Database Connector as a *nix console instance.

        • Stop-DBConnector-Service.bat - stops the frevvo Database Connector on a Windows operating system.

        • Stop-DbConnector.sh - stops the frevvo Database Connector *nix console instance.

    • Method 3 for *nix OS
      1. Execute the  DB Connector.sh shell script for Unix/Linux operating systems.
    • Method 4 for Linux
      1. The Database Connector can also run as a service under Linux systemd
     Click here for the details

    It is possible to manage the Database Connector using systemd ‘service’ scripts.

    1. Copy the sample service file located in /bin/dbconnector.service to /etc/systemd/system
    2. Review it's contents and
    3. Make sure it is executable.

    You can now use systemd to manage the dbconnector service:

    • systemctl start dbconnector.service

    • systemctl stop dbconnector.service

    • systemctl restart dbconnector.service

    • systemctl status dbconnector.service

    To flag the service to start automatically on system boot use the following command:

    systemctl enable dbconnector.service

    Consult the service unit configuration man page for more details.

  7.  Browse http://<your server>:8081/database/status  Verify that query validation page is loaded with status Passed



  8.  Log into your tenant  and test your forms and flows that interact with your database.