{"record":{"id":"bcaa24932f2328bb","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-list-of-procedures-from-database-meta-data","errorCode":null,"errorMessage":"Unable to get list of procedures from database meta-data: ","messagePattern":"Unable to get list of procedures from database meta-data: ","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/Database.java","lineNumber":4599,"sourceCode":"          String procCatalog = rowMeta.getString( row, \"PROCEDURE_CAT\", null );\n          String procSchema = rowMeta.getString( row, \"PROCEDURE_SCHEM\", null );\n          String procName = rowMeta.getString( row, \"PROCEDURE_NAME\", \"\" );\n\n          StringBuilder name = new StringBuilder();\n          if ( procCatalog != null ) {\n            name.append( procCatalog ).append( '.' );\n          }\n          if ( procSchema != null ) {\n            name.append( procSchema ).append( '.' );\n          }\n\n          name.append( procName );\n\n          result[ i ] = name.toString();\n        }\n        return result;\n      } catch ( Exception e ) {\n        throw new KettleDatabaseException( \"Unable to get list of procedures from database meta-data: \", e );\n      } finally {\n        if ( rs != null ) {\n          try {\n            rs.close();\n          } catch ( Exception e ) {\n            // ignore the error.\n          }\n        }\n      }\n    }\n  }\n\n  public boolean isAutoCommit() {\n    return commitsize <= 0;\n  }\n\n  /**\n   * @return Returns the databaseMeta.","sourceCodeStart":4581,"sourceCodeEnd":4617,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/Database.java#L4581-L4617","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Grant the DB user privileges to view procedure metadata (e.g. Oracle: SELECT_CATALOG_ROLE or ALL_OBJECTS access).","Update the JDBC driver to a version that correctly implements getProcedures.","Verify the connection is alive before the call and reconnect if stale.","Inspect the chained exception (getCause) for the driver's underlying error."],"exampleFix":"// before\nString[] procs = db.getProcedures(); // fails: no catalog privileges\n\n// after\n-- grant first: GRANT SELECT_CATALOG_ROLE TO app_user;\nString[] procs = db.getProcedures();","handlingStrategy":"try-catch","validationCode":"if (!db.checkConnection()) { db.disconnect(); db.connect(); }\n// pre-check privileges: user must be able to select procedure metadata","typeGuard":null,"tryCatchPattern":"try {\n  procedures = db.getProcedures();\n} catch (KettleDatabaseException e) {\n  throw new RuntimeException(\"Procedure listing failed: \" + e.getCause(), e);\n}","preventionTips":["Grant privileges to view procedure metadata (e.g. Oracle SELECT_CATALOG_ROLE)","Use a driver that implements getProcedures correctly","Keep connections healthy before metadata calls","Diagnose via the chained exception cause"],"tags":["jdbc","database-metadata","procedures","privileges"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}