{"record":{"id":"e557d234979bcc46","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-list-of-repository-objects","errorCode":null,"errorMessage":"Unable to get list of repository objects","messagePattern":"Unable to get list of repository objects","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryConnectionDelegate.java","lineNumber":1597,"sourceCode":"          if ( rs != null ) {\n            List<Object[]> rows = database.getRows( rs, -1, null );\n            if ( rs != null ) {\n              database.closeQuery( rs );\n            }\n            RowMetaInterface rowMeta = database.getReturnRowMeta();\n            for ( Object[] r : rows ) {\n              ObjectId id = new LongObjectId( rowMeta.getInteger( r, 4 ) );\n              repositoryObjects.add( new RepositoryObject( id, rowMeta.getString( r, 0 ), repositoryDirectory, rowMeta\n                .getString( r, 1 ), rowMeta.getDate( r, 2 ), objectType, rowMeta.getString( r, 3 ), false ) );\n            }\n\n          }\n          return repositoryObjects;\n        }\n      } );\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get list of repository objects\", e );\n    }\n  }\n\n  public ObjectId[] getIDs( String sql, ObjectId... objectId ) throws KettleException {\n\n    // Get the prepared statement\n    //\n    PreparedStatement ps = getPreparedStatement( sql );\n\n    // Assemble the parameters (if any)\n    //\n    RowMetaInterface parameterMeta = new RowMeta();\n    Object[] parameterData = new Object[ objectId.length ];\n    for ( int i = 0; i < objectId.length; i++ ) {\n      parameterMeta.addValueMeta( new ValueMetaInteger( \"id\" + ( i + 1 ) ) );\n      parameterData[ i ] = ( (LongObjectId) objectId[ i ] ).longValue();\n    }\n","sourceCodeStart":1579,"sourceCodeEnd":1615,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryConnectionDelegate.java#L1579-L1615","documentation":"Thrown when building the list of repository object types fails inside a callRead() callback that queries the repository metadata tables. Any exception (SQL error, missing table, connection problem) is wrapped into this KettleException, so the real cause is in the attached exception.","triggerScenarios":"Calling getRepositoryObjects() on the connection delegate during repository connect/metadata listing; the SELECT over the repository object table throws (missing R_* table, SQL syntax issue on an unsupported DB, broken connection).","commonSituations":"Connecting to a corrupted or partially created repository (missing system tables); unsupported database dialect producing invalid SQL; repository connection dropped; insufficient privileges to read metadata tables.","solutions":["Inspect the wrapped cause exception for the actual SQL/database error","Verify all Kettle system tables exist (run repository creation/upgrade SQL if tables are missing)","Check the connecting user has SELECT privileges on the repository tables","Confirm the database is a supported Kettle repository platform/dialect"],"exampleFix":"// before: assume repository is complete\nrep.connect(\"admin\", \"admin\");\n// after: verify tables exist / repair repository first\n// run the repository creation scripts or 'Repair' from Repository Explorer,\n// then reconnect\nrep.connect(\"admin\", \"admin\");","handlingStrategy":"try-catch","validationCode":"// verify system tables exist\nResultSet rs = md.getTables(null, null, \"R_REPOSITORY\", null);\nif (!rs.next()) { throw new IllegalStateException(\"Repository tables missing; run repository creation SQL\"); }","typeGuard":null,"tryCatchPattern":"try {\n  String[] objects = repository.getRepositoryObjects();\n} catch (KettleException e) {\n  log.error(\"Listing repository objects failed\", e.getCause());\n  // repair repository / check privileges before retry\n}","preventionTips":["Run repository creation/upgrade scripts completely after installs","Grant the repository user SELECT on all R_* tables","Use only supported database platforms for repositories"],"tags":["database","repository","metadata","sql"],"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"}