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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...