Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

-tomcat bundle or to dbconnector.properties file for the standalone bundle.

Excerpt

Logfiles

The Database Connector uses SLF4J with logback, which is the same logging infrastructure used in  .

Log MDC entries for configuration path, the querySet name, the query name, correlation.id, tenant id, subject.id. These will be captured when processing client requests.

Code Block
11:37:25.394 |-WARN  [http-nio-8082-exec-8] [c.f.c.d.s.MetaDataService] [mycompany ] [26d27ffe-1213-4c82-890b-cdc1a2e00e87 ] [  ] - Could not find retrieve operation for query STUDENT/addStudent. Skipping ...
11:37:27.186 |-ERROR [http-nio-8082-exec-8] [    c.f.c.d.QueryResource] [mycompany ] [26d27ffe-1213-4c82-890b-cdc1a2e00e87 ] [  ] - Error processing request for querySet STUDENT

It is very often useful to know the database and database driver name and version that is being used.  This information can be found in the logfile. An example is shown below:

Code Block
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverName: Microsoft JDBC Driver 6.3 for SQL Server
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverVersion: 6.3.1.0
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverMajorVersion: 6
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverMinorVersion: 3
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseProductName: Microsoft SQL Server
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseProductVersion: 14.00.900
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseMajorVersion: 14
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseMinorVersion: 0

Exceptions are properly logged with their stacktraces. This makes it easier to diagnose errors, which sometimes are frevvo/DBConnector specific and sometimes database specific.

All JDBC statements are logged in the DEBUG logging level. This includes the actual SQL statement used, the actual arguments, the number or rows returned and whether it was successful.

There are different logfiles for the Standalone and tomcat bundle installations.

Standalone mode

  1. Three logfiles are created in the \database\database-connector-2.5.3\logs directory:
    1. DbConnector.err.log - there is no content in this log at this time
    2. DbConnector.out.log - database connector standard out file. You can see the version of the database connector that is running in this file.
    3. DbConnector.wrapper.log - Date/Times of connector starts/stops when the Database Connector is running as a service.
  2. database-connector.YYYY-MM-DD.log - This is the main logfile for the Database Connector. You can see the results of the queryset/queries validation and output error messages in this file.

Turning on DEBUG level logging in Standalone Mode:
Log levels are controlled by the logging.level.com.frevvo.connectors.database property. Add this property to
  1. Stop the Standalone database connector.
  2. Edit the <db-home>\database-connector-2.5.3\config\dbconnector.properties file.
Restart
  1. Add the

connector
  1. following line.

Create the Database Connector log in JSON format
The spring.profiles.include=logging-json property creates the logfile in JSON format. Add this property to the <db-home>\database-connector-2.5.3\config\dbconnector.properties file.
  1. Code Block
     logging.level.com.frevvo.connectors.database=DEBUG
  2. Restart the connector.

Tomcat bundle

When debugging database queries refer to output error messages in <frevvo-home>\tomcat\logs\database-connector.YYYY-MM-DD.log

Turning on DEBUG level logging

Log levels are controlled by the logging.level.com.frevvo.connectors.database property.

To change the log level to DEBUG when using the tomcat bundle, follow these steps:

  1. Stop if it is running.Navigate to . You do not have to stop the Insight Server.
  2. Edit the <frevvo-home>\tomcat\conf directoryCreate/Edit the \frevvo-config.properties file.
  3. Add the logging.level.com.frevvo.connectors.database property with a value of DEBUG as shownfollowing line.

    Code Block
     logging.level.com.frevvo.connectors.database=DEBUG
  4. Save the file
  5. Restart
Create

Switch the Database Connector log in JSON format

If you want to create the connector logs in Logging output defaults to text format. To switch to JSON format, add the spring.profiles.include=logging-json thisproperty to the frevvo-config.properties file and restart . This will create JSON logfiles for all of the frevvo spring boot based connectors - Database, Box, Filesystem, Google and SharePoint. Support for the frevvo.log file will be added in a future release.

Code Block
titlefrevvo-config.properties - This property will create logs in JSON format for all connector logs
Code Block
spring.profiles.include=logging-json 
Image Removed

Common Problems

Doc Post Failure

If the submission doesn't reach the Database Connector, all tenant administrators or flow admins (if configured)  will receive a Doc Post Failure notification email reporting information about the error. Verify that the URL to the location of your database connector is correct in business rules or Doc URI's

<< Add a screen image of the Submissions UI with error icon and on-hover >>

Emails with information about the failure will be sent when certain database operations fail.

...

  • An update statement updates ) rows and autocreate is false
  • A auery with autocreate=true is missing a create statement
  • A query when autodelete is true and is missiong the delete statement
  • A query with the Delete statement and the delete Key is not defined
  • A delete statement where the specified delete key cannot be found in the retreived resultset
  • Browsing the URL to generate the schema for querysets
  • Updates do not trigger errors due to several valid use cases for update failures ex: autocreate=true
  • When calling a queryset with 1 or more autocreate or autodelete=true, iternally the DBC is likely to execute multiple SQL statements - it will try to delete all rows that were deleted from the form resultset that were originally in the resultset reteived from the database. It will try to update rows from the form resultset - and if autocreate is true and the update fails, it will execute an insert for each update failures. If any one of those fails (except Update) the transaction will be rolled back

 

...

Live Forms tomcat running on non-default port

...