pentaho/pentaho-kettle · error · KettleXMLException
SharedOjects.ReadingError
SharedOjects.ReadingError
Error message
${SharedOjects.ReadingError} What it means
VfsSharedObjectsIO.loadSharedObjectNodeMap throws KettleXMLException with the localized 'SharedOjects.ReadingError' message when any exception occurs while reading or parsing the shared objects XML file. The original exception is preserved as the cause, and pathToSharedObjectFile identifies the file that failed.
Solutions
- Inspect the cause chain (KettleXMLException.getCause()) to find the exact XML parse or IO error.
- Validate/repair the shared objects XML file, or restore a known-good copy (including the .backup sibling if present).
- If the file is corrupt beyond repair, move it aside and let Pentaho recreate an empty one, re-adding shared objects.
- Verify file readability/permissions and VFS connectivity before loading.
Example fix
// before
Document doc = XMLHandler.loadXMLFile( file ); // throws KettleXMLException on corrupt file
// after
try {
Document doc = XMLHandler.loadXMLFile( file );
} catch ( KettleXMLException e ) {
// restore from sharedObjectsFile + ".backup" or regenerate the file
} Defensive patterns
Strategy: try-catch
Validate before calling
File f = new File( pathToSharedObjectFile );
if ( f.exists() && f.canRead() && f.length() > 0 ) { /* safe to attempt load */ } Try / catch
try {
io.loadSharedObjectNodeMap();
} catch ( KettleXMLException e ) {
// restore from .backup or regenerate the shared objects file
log.error( "Reading shared objects failed: " + e.getCause() );
} Prevention
- Keep backups of shared.xml before upgrades
- Validate XML after any manual edit
- Check disk space/process interruption causes of truncated XML
When it happens
Trigger: Calling loadSharedObjectNodeMap when the shared objects file exists but XMLHandler.loadXMLFile fails — malformed XML, encoding problems, or IO/read errors on the VFS file.
Common situations: Corrupted or truncated shared.xml (e.g. after a failed write or crash); a partially restored .backup file; a VFS/network file that was readable at exists() check but failed during load.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Error loading transformation step from XML
- Error loading transformation step from XML
- NullIfMeta.Exception.UnableToReadStepInfoFromXML
- RepositoryMeta.Error.ReadingInfo
- Unable to read file
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/821932bbafa63d7f.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/shared/VfsSharedObjectsIO.java:115
* where key can be {"connection", "slaveserver", "partitionschema" or clusterschema"} and
* value will be xml Node.
*
* @param pathToSharedObjectFile The path to the shared object file
* @throws KettleXMLException
*/
private void loadSharedObjectNodeMap( String pathToSharedObjectFile ) throws KettleXMLException {
try {
// Get the FileObject
FileObject file = KettleVFS.getInstance( bowl ).getFileObject( pathToSharedObjectFile );
// If we have a shared file, load the content, otherwise, just keep this one empty
if ( file.exists() ) {
Document document = XMLHandler.loadXMLFile( file );
loadSharedObjectsNodeMap( document );
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString( PKG, "SharedOjects.ReadingError",
pathToSharedObjectFile ), e );
}
}
private Optional<String> createOrGetFileBackup( FileObject fileObject ) throws IOException, KettleException {
String backupFileName = sharedObjectsFile + ".backup";
boolean isBackupFileExist;
if ( fileObject.exists() ) {
isBackupFileExist = createFileBackup( backupFileName );
} else {
isBackupFileExist = getBackupFileFromFileSystem( backupFileName );
}
return isBackupFileExist ? Optional.ofNullable( backupFileName ) : Optional.empty();
}
private boolean createFileBackup( String backupFileName ) throws IOException, KettleFileException {
return copyFile( sharedObjectsFile, backupFileName );
}View on GitHub (pinned to f3058517a1)