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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...