pentaho/pentaho-kettle · error · KettleDatabaseException
Unable to determine if indexes exists on table [" +…
Error message
Unable to determine if indexes exists on table [" + tablename + "]
What it means
OracleDatabaseMeta.checkIndexExists wraps any Exception encountered while checking whether indexes exist on a table, rethrowing as a KettleDatabaseException naming the table. The underlying check inspects index metadata; any driver/SQL error surfaces under this message.
Solutions
- Verify the table name (case, schema qualification) exists on the Oracle instance
- Grant the connecting user privileges to the relevant metadata dictionary views (e.g. USER_INDEXES/ALL_INDEXES)
- Inspect the chained cause for the root driver error and fix connectivity/schema accordingly
Example fix
// before
boolean exists = oracleMeta.checkIndexExists(db, "MyTable", new String[]{null});
// after
boolean exists = oracleMeta.checkIndexExists(db, "MYTABLE", new String[]{"MYSCHEMA"}); // correct case + schema
Defensive patterns
Strategy: try-catch
Validate before calling
if (tablename == null || tablename.trim().isEmpty()) throw new IllegalArgumentException("Table name required for index check");
// optionally verify table exists first: db.getTableFields(tablename) Type guard
function canCheckIndexes(String tablename) { return tablename != null && !tablename.trim().isEmpty(); } Try / catch
try {
boolean ok = oracleMeta.checkIndexExists(db, tablename, schemas);
} catch (KettleDatabaseException e) {
Throwable cause = e.getCause(); // driver/SQL error: table name, privileges, connectivity
log.error("Index existence check failed on table " + tablename + ": " + (cause != null ? cause.getMessage() : e.getMessage()), e);
} Prevention
- Use the exact (correctly cased/quoted) Oracle table name and qualify with schema
- Ensure the connecting user can read the Oracle metadata dictionary views
- Verify connectivity before running catalog/metadata checks
When it happens
Trigger: Calling checkIndexExists(db, tablename, schemas) and the underlying index-lookup (JDBC metadata query or SQL against all_indexes-style catalogs) throws — bad table name, missing permissions on catalog views, or connection failure.
Common situations: Index existence checks before CREATE INDEX during table optimization; table name with wrong case/quoting; user lacking privileges to view Oracle metadata dictionary views.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Cannot fetch driver metadata for
- Database.Exception.EmptyConnectionError
- Database.Exception.UnableToGetMetadata
- DatabaseMeta.Error.UnableRetrieveDbInfo
- Error closing connection while searching primary keys in…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/421427d586e59e24.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/database/OracleDatabaseMeta.java:540
return false;
}
} finally {
if ( res != null ) {
database.closeQuery( res );
}
}
// See if all the fields are indexed...
boolean all = true;
for ( int i = 0; i < exists.length && all; i++ ) {
if ( !exists[i] ) {
all = false;
}
}
return all;
} catch ( Exception e ) {
throw new KettleDatabaseException( "Unable to determine if indexes exists on table [" + tablename + "]", e );
}
}
@Override
public boolean requiresCreateTablePrimaryKeyAppend() {
return true;
}
/**
* @return The maximum number of columns in a database, <=0 means: no known limit
*/
@Override
public int getMaxColumnsInIndex() {
return 32;
}
/**
* @return The SQL on this database to get a list of sequences.View on GitHub (pinned to f3058517a1)