How to debug an application with Checkpoints in Business Studio.

How to debug an application with Checkpoints in Business Studio.

book

Article ID: KB0094455

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
Checkpoints require the engine persistence mode to be either datastore or group. If you attempt to deploy a BW 6.x application with Checkpoint in Studio, the following message is logged to the console

+++++
TIBCO-BW-CORE-500110: Failed to install BW Module [com.my.Module:1.0.0.qualifier], DeploymentUnit [com.my.Application:1.0]. The module or a process is configured to utilize the BW Engine persistence feature; however the BW Engine is not configured with a correct engine persistence mode. Ensure the BW Engine is configured for the engine persistence mode [datastore] or [group] before installing this module.
+++++

The steps below will help to debug such an application in Studio.



Issue/Introduction

How to debug an application with Checkpoints in Business Studio.

Resolution

Steps to debug a checkpoint application in BusinessStudio using PostgresDB.

- Download and install PostgreSQL from http://www.postgresql.org/download/ .

- Configure Appspace persistance mode to datastore using PostGRES database.

    - Create a new Database, say bwenginedb 
    - Create a DB user, say bwuser which has all relevant permissions.

- Locate DB scripts create.sql and create-scp.sql under "<<BW_HOME>>\bw\6.3\config\dbscripts\" (e.g. C:\tibco\bw6\bw\6.3\config\dbscripts\engine\postgresql) and execute them against a bwenginedb database created in previous step.

- Import the attached project (Filename: checkpointsample.zip) in your workspace.

- Go to Debug configuration > Arguments > VM Arguments and add the following parameters to let the Studio application to use the datastore as an engine persistence mode.


  -Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=org.postgresql.Driver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser -Dbw.engine.db.url=jdbc:postgresql://localhost:5432/bwenginedb

          Screenshot(Filename: debug_ckpt.png) is attached for clarity.

- Invoke the application in debug mode and confirm that the application starts in the Studio console. Open a browser window and load the "http://localhost:8080"  URL. The following lines will be logged in the console for the checkpoint.

   +++++++++++

11:46:34.789 INFO  [Job_Executor0] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300021: All Application dependencies are resolved for Application [CHKPT.application:1.0]
11:46:40.328 INFO  [Thread-35] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300006: Started BW Application [CHKPT.application:1.0]
11:47:06.670 INFO  [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.Log.CHKPT.Log - ~~~~HTTP Request Received --> 
11:47:06.767 INFO  [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.Log.CHKPT.Log1 - Checkpoint taken
11:47:22.550 INFO  [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.CHKPT.Log - ~~~~HTTP Request Received --> 
11:47:22.589 INFO  [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.CHKPT.Log1 - Checkpoint taken

   +++++++++++

- The steps would remain the same for other supported databases except running specific DB scripts and modifying the DB details in the VM arguments. As an example, for SQL Server and Oracle DB are shown below.

      -Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser -Dbw.engine.db.url=jdbc:sqlserver://localhost:1433;databaseName=\bwenginedb

      -Dbw.engine.persistenceMode=datastore -Dbw.engine.db.jdbcDriver=oracle.jdbc.OracleDriver -Dbw.engine.db.userName=bwuser -Dbw.engine.db.password=bwuser -  Dbw.engine.db.url=jdbc:oracle:thin:@localhost:1521:orcl     

Attachments

How to debug an application with Checkpoints in Business Studio. get_app
How to debug an application with Checkpoints in Business Studio. get_app