pentaho/pentaho-kettle · error · KettleDatabaseException

Unable to get list of procedures from database meta-data:

Error message

Unable to get list of procedures from database meta-data: 

What it means

Thrown when reading the list of stored procedures via DatabaseMetaData.getProcedures(...) fails with any Exception. Kettle wraps it in a KettleDatabaseException. It means the procedure-name listing from database metadata could not be retrieved or parsed.

Solutions

  1. Grant the DB user privileges to view procedure metadata (e.g. Oracle: SELECT_CATALOG_ROLE or ALL_OBJECTS access).
  2. Update the JDBC driver to a version that correctly implements getProcedures.
  3. Verify the connection is alive before the call and reconnect if stale.
  4. Inspect the chained exception (getCause) for the driver's underlying error.

Example fix

// before
String[] procs = db.getProcedures(); // fails: no catalog privileges

// after
-- grant first: GRANT SELECT_CATALOG_ROLE TO app_user;
String[] procs = db.getProcedures();
Defensive patterns

Strategy: try-catch

Validate before calling

if (!db.checkConnection()) { db.disconnect(); db.connect(); }
// pre-check privileges: user must be able to select procedure metadata

Try / catch

try {
  procedures = db.getProcedures();
} catch (KettleDatabaseException e) {
  throw new RuntimeException("Procedure listing failed: " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Database.getProcedures() call where getDatabaseMetaData().getProcedures(...) throws or iterating the ResultSet (procName column) fails — driver rejects the call, connection broken, or unexpected NULL column values.

Common situations: User lacks privileges to list procedures (e.g. Oracle DBA views); driver doesn't implement getProcedures; connection dropped; NULL PROCEDURE_NAME values causing unexpected data handling failures.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/bcaa24932f2328bb. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/database/Database.java:4599

          String procCatalog = rowMeta.getString( row, "PROCEDURE_CAT", null );
          String procSchema = rowMeta.getString( row, "PROCEDURE_SCHEM", null );
          String procName = rowMeta.getString( row, "PROCEDURE_NAME", "" );

          StringBuilder name = new StringBuilder();
          if ( procCatalog != null ) {
            name.append( procCatalog ).append( '.' );
          }
          if ( procSchema != null ) {
            name.append( procSchema ).append( '.' );
          }

          name.append( procName );

          result[ i ] = name.toString();
        }
        return result;
      } catch ( Exception e ) {
        throw new KettleDatabaseException( "Unable to get list of procedures from database meta-data: ", e );
      } finally {
        if ( rs != null ) {
          try {
            rs.close();
          } catch ( Exception e ) {
            // ignore the error.
          }
        }
      }
    }
  }

  public boolean isAutoCommit() {
    return commitsize <= 0;
  }

  /**
   * @return Returns the databaseMeta.

View on GitHub (pinned to f3058517a1)