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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...