Missing Beans or not monitoring DB Tables

Search logs for exceptions

The logs are in: /var/log/vfunction/instances/<instance_name>/vfagent.log /var/log/vfunction/instances/<instance_name>/vfagent.log.dbtracking /var/log/vfunction/instances/<instance_name>/vfagent.log.beanstracking

You can search the logs for exceptions and other errors

Setting true\false in the properties file according to the Monolith settings

The file /etc/sysconfig/vfunction/agent/instances/<instance_name>/vfunction-runtime-override.properties has runtime properties that control the analysis.

These values are set during the installation of the controller according to the file /etc/sysconfig/vfunction/installation/instances/default/installation.yaml. The parameters are application_server (under agent) and the override_properties.

It is recommended to ensure the application_server is set to the right application server type before changing the properties, and if not, set it correctly and run upgrade (/opt/vfunction/controller-installation/upgrade.sh)

Review the properties and make sure the relevant ones are set to true.

For example:

Section DB Tracking (Default)

com.vfunction.runtime.config.aop.xml.db.tracking.enabled=true
com.vfunction.runtime.config.aop.xml.db.tracking.jdbcdriver.enabled=false

Section Beans (Default)

com.vfunction.runtime.config.tracking.beans.ejb.stateless.enabled=true
com.vfunction.runtime.config.tracking.beans.ejb.stateful.enabled=true
com.vfunction.runtime.config.tracking.beans.ejb.singleton.enabled=true
com.vfunction.runtime.config.tracking.beans.ejb.interceptor.enabled=true
com.vfunction.runtime.config.tracking.beans.ejb.mdb.enabled=true

Handling Exceptions concerning DB connection classes

If the logs show exceptions concerning DB connections, for example:

java.lang.ClassCastException: vfrtshadow.com.p6spy.engine.wrapper.ConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

Then try to do DB tracking via JDBC:

  1. Edit the file: etc/sysconfig/vfunction/agent/instances/<instance_name>/vfunction-runtime-override.properties

  2. Set the properties values:

  • com.vfunction.runtime.config.aop.xml.db.tracking.enabled=false
  • com.vfunction.runtime.config.aop.xml.db.tracking.jdbcdriver.enabled=true
  1. Restart the application (the monolith)

Getting more debug messages for the database tracking

Turn on a flag to print debug messages into the logs.

Add -Dcom.vfunction.logging.level.dbtracking=DEBUG to the other vFunction JVM arguments set during the agent installation and restart the monolith. The logs will be added to the vfagent.log.dbtracking file.

Missing DB Tables due to errors in parsing SQL Queries

If you don’t see the tables you expect in the resources, there is a chance that there are some errors in parsing the SQL queries by vFunction

To check, look for SQL parsing error in /var/log/vfunction/instances/<instance_name>/vfagent.log.dbtracking

If such errors exist, open the file /etc/sysconfig/vfunction/agent/instances//vfunction-runtime-override.properties and set the property com.vfunction.runtime.config.db.tracking.parser to an explicit parser: Oracle, MySQL, mariadb, postgres, mssql, db2