...
- <host> - the URL for the web server on which you deployed database.war.
- <port> - port where the container is listening for http requests. This defaults to 8082 if the database connector was deployed in the tomcat bundle or port 8081 if you are running the Database Connector in Standalone mode.
- <queryset name> - queryset name defined in the database connector configuration file.
- <query name> – query name defined in the database connector configuration file.
Logfiles
Excerpt | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 | database connector logging output is very helpful for troubleshooting database SQL issues. This example shows the log entry generated when browsing with an incorrect query name.
The database connector logs version information for each datasource definition as it makes initial contact with your database(s).
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 To log the actual SQL statement used, the actual arguments, the number or rows returned and whether it was successfulsuccess status, set logging level to INFO. There are different logfiles for the Standalone and tomcat bundle installations. Standalone modeThree logfiles are created in theThere are four logfiles in <db-home>\database\database-connector-2.5. 3x\logs directory:
Turning on DEBUG level loggingin Standalone Mode:Log levels are controlled by the logging.level.com.frevvo.connectors.database property. Add this property to
Create the Database Connector log in JSON formatThe 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.
Tomcat bundleWhen debugging database queries refer to output error messages in The database connector writes all output to a single logfile <frevvo-home>\tomcat\logs\database-connector.YYYY-MM-DD.log Turning on DEBUG level loggingLog 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:
Switch the Database Connector log in JSON formatIf 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 | | |||||||||
|
Code Block |
---|
spring.profiles.include=logging-json |
Common Problems
Doc Post Failure
If the a submission doesn't reach the Database Connector or when certain database operations fail, will
- Flag the submission with an error in the Submissions Table
- Send Doc Post Failure notification email(s) reporting information about the error to all tenant administrators or flow admins (if configured)
...
Example 1:
The email reports a Connection refused error - To resolve, verify the URL to your database connector is correct in business rules or Doc URI's
Emails with information about the failure will be sent when certain database operations fail.
Example 2:
All DBC SQL operations are performed within a database transaction. When the following SQL errors occur, flags the submission with an error and generates Doc Action Failure emails to the tenant/flow admin(s) :
- An update statement updates ) rows and autocreate is false
- A query with autocreate=true is missing a create statement
- A query when autodelete is true and is missing 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 retrieved resultset
- If any one of the SQL operations (except Update) fails
- For example: When calling a querySet with 1 or more autocreate or autodelete=true, internally 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 retrieved 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 failure.
- For example: When calling a querySet with 1 or more autocreate or autodelete=true, internally the DBC is likely to execute multiple SQL statements:
- 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
Log entries for the error are captured in the database-connector.YYYY-MM-DD.log
Code Block |
---|
2017-10-26 13:46:05.828 ERROR mycompany 93f95ebc-6a85-4426-a015-eb34a1c96042 17048 --- [http-nio-8082-exec-8] c.f.connectors.database.QueryResource : Create operation not defined for query BIRT/createOrder
2017-10-26 13:46:05.829 INFO mycompany 93f95ebc-6a85-4426-a015-eb34a1c96042 17048 --- [http-nio-8082-exec-8] org.restlet.Component (2011499821) : 2017-10-26 13:46:05 127.0.0.1 - 127.0.0.1 8082 POST /database/BIRT/createOrder - 404 328 535 6 http://localhost:8082 Jakarta Commons-HttpClient/3.1 - |
Live Forms tomcat running on non-default port
...