Installation

seeing an error: "command="dbquery", Error getting database connection: Could not create a validated object, cause: ValidateObject failed"

JuhaT
New Member

"command="dbquery", Error getting database connection: Could not create a validated object, cause: ValidateObject failed"

Any solution for this? I get the same error when trying to connect glassfish Java DB (Derby) and setting

database_types.conf:
jdbcDriverClass = org.apache.derby.jdbc.EmbeddedDriver

Tags (1)
0 Karma
1 Solution

Dan
Splunk Employee
Splunk Employee

Every time a connection is re-used in the pool - which happens is you're doing a dbquery - DB Connect will try to validate that the database connection is actually working. If validation fails, you will likely see an error message like the one above.

There are two ways DB Connect tries to validate a connection:

1) If a testQuery is specified in database_types.conf, DB Connect will execute that query, and a response will validate that the database connection is working.

2) If testQuery is not specified, DB Connect will try to use the Java method connection.isValid(), and rely on the JDBC driver to answer. Some JDBC drivers do not implement this API call (seems like Derby is build against Java 1.5 source, where JDBC doesn't have the method isValid). The workaround is to specify a manual testQuery. The simplest one is SELECT 1.

View solution in original post

0 Karma

Dan
Splunk Employee
Splunk Employee

Every time a connection is re-used in the pool - which happens is you're doing a dbquery - DB Connect will try to validate that the database connection is actually working. If validation fails, you will likely see an error message like the one above.

There are two ways DB Connect tries to validate a connection:

1) If a testQuery is specified in database_types.conf, DB Connect will execute that query, and a response will validate that the database connection is working.

2) If testQuery is not specified, DB Connect will try to use the Java method connection.isValid(), and rely on the JDBC driver to answer. Some JDBC drivers do not implement this API call (seems like Derby is build against Java 1.5 source, where JDBC doesn't have the method isValid). The workaround is to specify a manual testQuery. The simplest one is SELECT 1.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...