{"record":{"id":"3902a971bb900732","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-shared-objects","errorCode":null,"errorMessage":"Unable to load shared objects","messagePattern":"Unable to load shared objects","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1436,"sourceCode":"        // (no need to check for next on all iterators)\n        while ( filesIter.hasNext() ) {\n          RepositoryFile file = filesIter.next();\n          NodeRepositoryFileData repoData = dataIter.next();\n          VersionSummary version = versionsIter.next();\n\n          // TODO: inexistent db types can cause exceptions assembling; prevent total failure\n          try {\n            sharedObjects.add( assembler.assemble( file, repoData, version ) );\n          } catch ( Exception ex ) {\n            // TODO i18n\n            getLog().logError( \"Unable to load shared objects\", ex );\n          }\n        }\n        sharedObjectsByType.put( entry.getKey(), sharedObjects );\n      }\n    } catch ( Exception ex ) {\n      // TODO i18n\n      throw new KettleException( \"Unable to load shared objects\", ex ); //$NON-NLS-1$\n    } finally {\n      readWriteLock.readLock().unlock();\n    }\n  }\n\n  /**\n   * Fetch {@link RepositoryFile}s by {@code RepositoryObjectType}.\n   *\n   * @param allFiles\n   *          List to add files into.\n   * @param types\n   *          Types of files to fetch\n   * @return Ordered map of object types to list of files.\n   * @throws KettleException\n   */\n  private LinkedHashMap<RepositoryObjectType, List<RepositoryFile>> getFilesByType( List<RepositoryFile> allFiles,\n                                                                                    RepositoryObjectType... types )\n    throws KettleException {","sourceCodeStart":1418,"sourceCodeEnd":1454,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1418-L1454","documentation":"PurRepository.readSharedObjects() pulls all shared files, versions, and assembles them; any exception in that multi-step process (after more specific errors like file-type or assembler failures) is wrapped in a KettleException with this message.","triggerScenarios":"Calling readSharedObjects()/shared-object load when the file service, versioning service, or data service throws — e.g. missing version summaries, unreadable node data, or serialization failures while importing file content into metadata.","commonSituations":"Repository shared objects (DB connections, partition schemas, cluster schemas) corrupted or partially deleted; version history pruned on the server while files remain; transient service outages.","solutions":["Inspect the cause chain (ex.getCause()) for the specific failing service.","Repair or re-export/re-import the shared objects area in the repository.","Check that the versioning service is enabled and version summaries exist for shared files.","Catch KettleException and proceed without shared objects if the transformation can run standalone."],"exampleFix":"// before\nRepository rep = new PurRepository(); rep.connect(...); // shared objects loaded implicitly\n// after\ntry {\n  rep.connect(...);\n} catch (KettleException e) {\n  logError(\"Shared objects failed to load: \" + e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"// ensure versioning enabled and shared area intact before loading\n// e.g. check repository.getVersioningServicePrinciple() or simply pre-list shared files","typeGuard":"boolean sharedAreaOk = repository != null && repository.isConnected();","tryCatchPattern":"try { loadSharedObjects(); } catch (KettleException e) { Throwable root = e.getCause(); log.error(\"shared objects failed\", root); }","preventionTips":["Enable and verify the versioning service on the repository server.","Do not delete version history for shared object files.","Re-export/import shared objects if they become corrupted.","Log the full cause chain, not just the wrapper message."],"tags":["repository","kettle","shared-objects","serialization"],"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"}