This documentation is for Live Forms 7.3 Not for you? Earlier documentation is available too.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

111

The Database Connector is a web application and can be deployed under any Servlet container or run in a simple Standalone mode. The connector relies on the JDBC API. You can use any relational database as long as you have a JDBC driver for that database.

These instructions apply to Cloud and in-house customers.

On this page:

Installation Steps

The Database Connector can be configured to run in:

  • A servlet container such as the frevvo-tomcat in-house bundle. We recommend this for in-house customers.
  • Standalone mode - Recommended for cloud customers as no additional servlet container is needed. This mode is also useful for in-house customers who want to run the connector on a different server than the server installation.

Follow these instructions:

  1. frevvo-tomcat bundle Instructions or Standalone Instructions
  2. Connector Configuration Instructions - detailed steps to integrate the connector with your database.

Cloud customers must verify connector connectivity to the frevvo Cloud Server.

frevvo-tomcat bundle Instructions

These instructions assume that your frevvo-tomcat bundle is already installed and running successfully.

  1. Stop your server.
  2. Download the database.war into <frevvo-home>\tomcat\webapps.
  3. Install the JDBC driver
  4. Start your server

When the status returns Passed for each queryset, you are ready to configure the Database Connector.


Standalone Instructions

  1. Review Supported Platforms. Verify that the certified version of Java is installed and the Java_Home environment variable has been configured .
  2. Download the Database Connector Standalone bundle.
  3. Unzip the database.zip file to a location of your choice. We will refer to this directory as <db-home>
  4. Install the JDBC driver
  5. You can start the connector using plain java command or execute one of the files in this directory to install the DB Connector as a Windows service or *nix console instance:
    1. Choose one of these methods to start the connector:
      1. Method 1: Using java in a command window
        1. Navigate to the <directory where you unzipped the database.zipfile>
        2. Type java -jar database.war
      2. Method 2: for Windows OS
        1. Install the DB Connector as a Windows service by double clicking the Install-Service.bat file. Click the Start DBConnector Service.bat to start the service.
      3. Method 2 for *nix OS
        1. Execute the  DB Connector.sh shell script for *nix operating systems.
  6. Test the connector installation by copying this URL directly into your browser:

    http://localhost:8081/database/status - Note the standalone connector runs on port 8081 by default.  

  7. When the status returns Passed for each queryset, you are ready to configure the Database Connector.



  8. If the status returns failures or disabled Connector Test failed then:

    1. Review the previous installation steps
    2. See starting and testing the connector installation for more detailed instructions and common problems.

     
 Click here for alternative ways to run the Database Connector

The database.zip file has the following structure:

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.


There is another option for Linux systems. The Database Connector can also run as a service using systemd

Systemd is the successor of the System V init system, and is now being used by many modern Linux distributions. Although you can continue to use init.d scripts with systemd, it is also possible to launch Spring Boot applications using systemd ‘service’ scripts.Copy the sample service file located in /bin/dbconnector.service to /etc/systemd/system, review it's contents and 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. Remember to change the User if you plan to run it as a different user name.

Install a JDBC driver

The connector relies on the JDBC API. You can use any relational database as long as you have a JDBC driver for that database.

You MUST use a JDBC4 type driver, version 5.1.26 or later.

The  download package comes with the pre-installed drivers listed below.

  • MS SQL driver

    If you are running the Database Connector in Standalone mode, this driver is embedded in the database.war. However, you MUST copy the sqljdbc.jar to the <frevvo-home>/tomcat/lib directory if you are deploying the connector in the tomcat bundle

  • DERBY driver

If you don't find what you need pre-installed you will need to locate a driver compatible to your database. Usually you can download your driver from the internet. Try one of these locations. Refer to the Using the jTDS driver topic for information if you are using the jTDS SQL Server driver.

Once you have the driver you need, copy it to:

  • <frevvo-home>/tomcat/lib if you are deploying the connector in the tomcat bundle
  • <directory where you unzipped the Database Connector Standalone bundle \database-connector-2.5.x\lib

    If you are running the Database Connector in Standalone mode, the MSSQL driver is embedded in the database.war. However, you MUST copy the sqljdbc.jar to the <frevvo-home>/tomcat/lib directory if you are deploying the connector in the tomcat bundle

It is also appropriate to copy the driver into any location that is in the CLASSPATH of your servlet container. In a tomcat installation another location would be <CATALINA_HOME>/lib.

Using the jTDS driver

There are some special considerations when defining datasources if you are using the jTDS driver. The validationQuery must be included in the resource definition. This query is used during the validation sequence. This is not needed for the Microsoft's JDBC driver as it will be inferred for you.

Here is an example of the resource definition for the jTDS driver for a database named TEST:

queryset name="TEST">
     <resource-def>
          <url>jdbc:jtds:sqlserver://dbhost;DatabaseName=TEST;</url>
          <validationQuery>SELECT 1</validationQuery>
          <user>dbconnector</user>
          <password>************</password>
     </resource-def>
...

If you are using the dbconnector.properties or frevvo-config.properties file to define your datasources you must add the validationQuery property.

Here is the same example as above as it would appear in the dbconnector.properties file:

dbconnector.queryset@TEST.resource-def.url=jdbc:jtds:sqlserver://dbhost;databaseName=TEST;
dbconnector.queryset@TEST.resource-def.validationQuery=SELECT 1
dbconnector.queryset@TEST.resource-def.user=dbconnector
dbconnector.queryset@TEST.resource-def.password=*******

DB Connector Quick Demo

The database connector contains working sample databases with some test data. The BIRT (ClassicModels) and myStore querySets are preloaded with in-memory Derby databases.  This make it very easy to try out the connector. No configuration is necessary.

Follow the steps below to deploy the connector in Standalone mode or the tomcat bundle and you can get started very quickly.

The In-house tomcat bundle:

  1. Verify that Java 8 is installed and the Java_Home environment variable has been configured .
  2. Download the latest tomcat bundle from the frevvo website.
  3. Download the Database Connector warfile. Rename the file to database.war
  4. Extract the tomcat bundle zipfile to a location of your choice. We will refer to this directory as <frevvo-home>.
  5. Copy database.war to <frevvo-home>\tomcat\webapps.
  6. Start the Insight server. and then start Live Forms.

     Click here for the instructions to start the Insight Server and Live Forms

     requires Insight software for the Reporting and Submissions View feature. The Insight software is included in the tomcat bundle. The Insight server MUST be started BEFORE starting . Instructions for Windows and Linux operating systems are listed here:

     Windows:

    1. Open a command prompt. Navigate to <frevvo-home>\solr-5.4.1.Type bin\solr.cmd start to run the Insight server in the background, listening on the default port 8983.

      You will see this message:



    2. Browse http;<your server:your port>/solr to verify the Insight server is running. The <server:port> default values are localhost:8983. Change <your server>  to the server name and <your port> to the port the Insight server is running on if they are different than the defaults. Do not include the angle brackets <>. You will see the Insight server (Solr) dashboard with the current status:

    If you close the Insight server (Solr) startup window, the server will stop running. Leave the window open or set up Live Forms and the Insight Server to run as Windows services.

    Linux:

    1. Ensure that the scripts are executable: chmod 755 <frevvo-home>/tomcat/bin/*.sh
    2. Navigate to <frevvo-home>/solr-5.4.1/bin. Run this command to make the solr startup file executable:

      chmod +x solr
    3. Navigate back to the solr-5.4.1 directory.
    4. Start the Insight server by typing:

      bin/solr start - this starts the Insight server in the background, listening on the default port 8983.
    5. Browse http;<your server:your port>/solr to verify the Insight server is running. The <server:port> default values are localhost:8983. Change <your server>  to the server name and <your port> to the port the Insight server is running on if they are different than the defaults. Do not include the angle brackets <>. You will see the Insight server (Solr) dashboard with the current status:

       

      You do not have to restart the Insight server every time you restart .

  7. Test the connector installation by copying this URL directly into your browser:

    http://localhost:8082/database/status

    After performing these steps you will have:

    • Successfully installed the  database connector and retrieved data from the built-in test database
  8. Create a tenant.
  9. Create a designer user in the tenant
  10. Download the Database Connector Application and upload it to the designer user for some example forms that demonstrate the power of the Database Connector using built-in databases.


  • No labels