pentaho/pentaho-kettle · error · ControllerInitializationException
RepositoryLockController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE
RepositoryLockController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE
Error message
Unable to initialize repository service [ {0} ] What it means
RepositoryLockController.init requires the repository to expose an ILockService. If the repository is null or hasService(ILockService.class) is false, it throws ControllerInitializationException with ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE, since lock management cannot work without the service.
Solutions
- Initialize only against a repository providing ILockService (rep.hasService(ILockService.class))
- Guard init: check the service exists and skip/disable lock UI otherwise
- Catch ControllerInitializationException around RepositoryLockController.init and continue without the lock feature
- Verify the Pentaho EE repository plugin is properly installed and the user is connected
Example fix
// before
lockController.init( rep );
// after
if ( rep != null && rep.hasService( ILockService.class ) ) {
lockController.init( rep );
} Defensive patterns
Strategy: try-catch
Validate before calling
if (rep != null && rep.hasService(ILockService.class)) { lockController.init(rep); }
Type guard
static boolean hasLockService(Repository rep) {
return rep != null && rep.hasService(ILockService.class);
}
Try / catch
try {
lockController.init(rep);
} catch (ControllerInitializationException e) {
log.warn("Lock service unavailable; lock UI disabled", e);
// hide lock-related controls
}
Prevention
- Verify ILockService availability before wiring the lock controller
- Only initialize lock UI on Pentaho EE repositories
- Catch ControllerInitializationException so one unsupported feature doesn't break the explorer
When it happens
Trigger: Calling init(rep) on a repository lacking the lock service (no ILockService), or passing null — e.g. non-EE repositories that don't implement lock services.
Common situations: Initializing the lock tab/controllers against a database or file repository instead of a Pentaho EE repository; repository connection incomplete when the explorer initializes controllers; EE plugin version mismatch removing the lock service.
Related errors
- PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AddSequenceMeta.Exception.UnableToSaveStepInfo
- Attempting to create PDI Repository with no Active…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/110b669a660fa3f1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/RepositoryLockController.java:97
@Override
public Enumeration<String> getKeys() {
return null;
}
@Override
protected Object handleGetObject( String key ) {
return BaseMessages.getString( PKG, key );
}
};
public void init( Repository rep ) throws ControllerInitializationException {
try {
if ( rep != null && rep.hasService( ILockService.class ) ) {
repository = rep;
service = (ILockService) rep.getService( ILockService.class );
} else {
throw new ControllerInitializationException( BaseMessages.getString( PKG,
"RepositoryLockController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE", ILockService.class ) ); //$NON-NLS-1$
}
bindingFactory = new DefaultBindingFactory();
bindingFactory.setDocument( getXulDomContainer().getDocumentRoot() );
XulEventHandler eventHandler = getXulDomContainer().getEventHandler( "browseController" ); //$NON-NLS-1$
if ( eventHandler instanceof BrowseController ) {
browseController = (BrowseController) eventHandler;
}
// Disable row dragging if it is locked and the user does not have permissions
fileTable = (XulTree) getXulDomContainer().getDocumentRoot().getElementById( "file-table" ); //$NON-NLS-1$
folderTree = (XulTree) document.getElementById( "folder-tree" ); //$NON-NLS-1$
lockFileMenuItem = (XulMenuitem) getXulDomContainer().getDocumentRoot().getElementById( "file-context-lock" ); //$NON-NLS-1$
deleteFileMenuItem = (XulMenuitem) getXulDomContainer().getDocumentRoot().getElementById( "file-context-delete" ); //$NON-NLS-1$View on GitHub (pinned to f3058517a1)