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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...