pentaho/pentaho-kettle · error · ArgumentInvalidError
Module with id ' ' specifies an alias which is already…
Error message
Module with id '{id}' specifies an alias which is already taken: '{alias}'. What it means
pentaho.lang.ArgumentInvalidError thrown by prepareModule when a module declares an `alias` that is already in use — either by an already-registered module (this.__get(alias) hits) or by another entry in the same batch. Aliases must be unique across the module registry.
Solutions
- Change the alias of the new module to a unique string.
- Remove the alias from one of the conflicting modules.
- Search the config/plugins for the alias string to find all users of it.
Example fix
// before
{"x": {"alias": "chart"}, "y": {"alias": "chart"}}
// after
{"x": {"alias": "chart"}, "y": {"alias": "chart2"}} Defensive patterns
Strategy: validation
Validate before calling
var aliases = {};
Object.keys(map).forEach(function(k) {
var a = map[k] && map[k].alias;
if(a && (aliases[a] || k === a || map[a])) throw new Error("alias taken: " + a);
if(a) aliases[a] = k;
}); Type guard
null
Try / catch
try { metaService.__configure(map); } catch(e) { if(/already taken/.test(e.message)) { console.warn(e.message); } else { throw e; } } Prevention
- Namespace aliases per plugin to avoid collisions
- Grep config for an alias before adopting it
When it happens
Trigger: Defining two modules whose `alias` properties are equal, or defining a module whose alias collides with an existing module's id/alias registered earlier in the MetaService.
Common situations: Two plugins/annotations choosing the same short alias; renaming a module but leaving the old alias on a second module; shared config fragments each defining the same alias.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- A module with the id or alias
- Can not create element type with id…
- Can not create element type with id
- Failed to create object in repository. Object
- Failed to create object in repository. Object
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2c324fbb8dd53077.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js:122
if(O.hasOwn(preparedModuleSpecMap, id)) {
throw new ArgumentInvalidError(
"moduleSpecMap",
"A module with the id or alias '" + id + "' is already being defined.");
}
moduleSpec = Object.create(moduleSpec);
moduleSpec.id = id;
moduleSpec.index = nextModuleIndex++;
preparedModuleIdList.push(id);
// Index by id and by alias, if any.
preparedModuleSpecMap[id] = moduleSpec;
var alias = textUtil.nonEmptyString(moduleSpec.alias);
if(alias !== null && alias !== id) {
if(this.__get(alias) !== null || O.hasOwn(preparedModuleSpecMap, alias)) {
throw new ArgumentInvalidError(
"moduleSpecMap",
"Module with id '" + id + "' specifies an alias which is already taken: '" + alias + "'.");
}
preparedModuleSpecMap[alias] = moduleSpec;
}
}
}
function moduleResolver(idOrAlias, expectedKind) {
var module = me.__get(idOrAlias);
if(module === null) {
var preparedModuleSpec = O.getOwn(preparedModuleSpecMap, idOrAlias, null);
if(preparedModuleSpec === null) {
throw new ArgumentInvalidError(
"moduleSpecMap",
"A module with id '" + idOrAlias + "' is not defined.");View on GitHub (pinned to f3058517a1)