{"record":{"id":"488a51729995729b","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-object-information-for-object-with-id-objectid-488a51","errorCode":null,"errorMessage":"Unable to get object information for object with id={objectId}","messagePattern":"Unable to get object information for object with id=(.+?)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepository.java","lineNumber":2035,"sourceCode":"        case DATABASE: {\n          RowMetaAndData row = databaseDelegate.getDatabase( objectId );\n          name = row.getString( KettleDatabaseRepository.FIELD_DATABASE_NAME, null );\n          return new RepositoryObject(\n              objectId, name, null, null, null, objectType, null, false );\n        }\n        default:\n          throw new KettleException( \"Object type \"\n            + objectType.getTypeDescription()\n            + \" was specified.  Only information from transformations, jobs and databases can be retrieved at this time.\" );\n          // Nothing matches, return null\n      }\n\n      boolean isDeleted = ( name == null );\n      directory = loadRepositoryDirectoryTree().findDirectory( new LongObjectId( dirId ) );\n      return new RepositoryObject(\n        objectId, name, directory, modifiedUser, modifiedDate, objectType, description, isDeleted );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get object information for object with id=\" + objectId, e );\n    }\n  }\n\n  public JobMeta loadJob( ObjectId idJob, String versionLabel ) throws KettleException {\n    RepositoryObject jobInfo = getObjectInformation( idJob, RepositoryObjectType.JOB );\n    return loadJob( jobInfo.getName(), jobInfo.getRepositoryDirectory(), null, versionLabel );\n  }\n\n  public TransMeta loadTransformation( ObjectId idTransformation, String versionLabel ) throws KettleException {\n    RepositoryObject jobInfo = getObjectInformation( idTransformation, RepositoryObjectType.TRANSFORMATION );\n    return loadTransformation( jobInfo.getName(), jobInfo.getRepositoryDirectory(), null, true, versionLabel );\n  }\n\n  public String getConnectMessage() {\n    return null;\n  }\n\n  public IRepositoryExporter getExporter() {","sourceCodeStart":2017,"sourceCodeEnd":2053,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepository.java#L2017-L2053","documentation":"KettleDatabaseRepository.getObjectInformation() wraps any failure while reading repository object metadata (name, directory, type, dates) by object id into this KettleException. It is a catch-all around loadRepositoryDirectoryTree().findDirectory() and RepositoryObject construction, so any JDBC or lookup failure surfaces here.","triggerScenarios":"Calling getObjectInformation(idJob, RepositoryObjectType.JOB) or the transitive loadJob/loadTransformation with an ObjectId that does not exist in the repository tables, or when the underlying database connection fails while resolving the directory tree.","commonSituations":"Stale ObjectId saved from another repository/database; repository schema not upgraded after a Pentaho version change; database unreachable or credentials wrong so directory-tree loading throws.","solutions":["Verify the ObjectId exists in the repository database (check R_REPOSITORY_LOG / the corresponding object table).","Confirm the repository database connection is alive and credentials are correct before calling.","Run the repository upgrade/repair so the schema matches the current Pentaho version.","Catch the KettleException and re-look-up the object by name/directory instead of a cached id."],"exampleFix":"// before\nRepositoryObject info = repo.getObjectInformation(staleId, RepositoryObjectType.JOB);\n// after\nRepositoryObject info;\ntry {\n  info = repo.getObjectInformation(staleId, RepositoryObjectType.JOB);\n} catch (KettleException e) {\n  info = repo.getObjectInformation(name, repo.loadRepositoryDirectoryTree().findDirectory(dirPath), RepositoryObjectType.JOB);\n}","handlingStrategy":"try-catch","validationCode":"// verify id resolves before use\nboolean exists = repo.getObjectId(new RepositoryElementMetaLocator() { ... }) != null; // or query repository log table\nif (objectId == null) throw new IllegalArgumentException(\"null objectId\");","typeGuard":"boolean isValidObjectId(ObjectId id) { return id != null && id.getId() != null; }","tryCatchPattern":"try {\n  RepositoryObject info = repo.getObjectInformation(id, RepositoryObjectType.JOB);\n} catch (KettleException e) {\n  // log e, fall back to lookup by name/directory\n}","preventionTips":["Do not cache ObjectIds across repositories or database rebuilds.","Verify DB connectivity before repository calls.","Keep the repository schema version matched to the Pentaho version.","Handle loadJob/loadTransformation failures by re-resolving by name."],"tags":["repository","database","lookup-failed"],"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"}