pentaho/pentaho-kettle · error · ArgumentInvalidError
Module map contains an empty module identifier.
Error message
Module map contains an empty module identifier.
What it means
pentaho.lang.ArgumentInvalidError thrown by prepareModule in MetaService while validating a moduleSpecMap: a key in the map is an empty (falsy) module identifier. Every module entry in the map must be indexed by a non-empty id.
Solutions
- Fix the key in the moduleSpecMap so every entry has a non-empty string id.
- Log the incoming map before configuration to spot the empty key.
- Skip or default empty ids at map construction time.
Example fix
// before
var map = {}; map[getConfig("moduleId")] = spec; // moduleId may be ""
// after
var id = getConfig("moduleId");
if(id) map[id] = spec; Defensive patterns
Strategy: validation
Validate before calling
Object.keys(moduleSpecMap).forEach(function(k) {
if(!k) throw new Error("empty module id in moduleSpecMap");
}); Type guard
function hasValidIds(map) { return Object.keys(map).every(function(k) { return typeof k === "string" && k.length > 0; }); } Try / catch
try { metaService.__configure(map); } catch(e) { if(/empty module identifier/.test(e.message)) { console.error("bad keys:", Object.keys(map)); } else { throw e; } } Prevention
- Guard computed keys before adding them to the map
- Validate the whole spec map before configuration
When it happens
Trigger: Calling __configure/metaService configuration with a map like {"": {...}} or {null: {...}}, typically from a computed key that evaluated to an empty string.
Common situations: Dynamically building the module map from config or variables where an id variable was empty; JSON config with an empty-string key; templated module definitions where substitution failed.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Module with id ' ' provides no specification.
- A module with id ' ' is not defined.
- A module with the id or alias
- ERROR_INVALID_ARGUMENT
- Expected module with id or alias
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/db2e4fb45356212c.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core-ui/src/main/resources/app/pentaho/_core/module/MetaService.js:86
var me = this;
var preparedModuleSpecMap = {};
var preparedModuleIdList = [];
O.eachOwn(moduleSpecMap, prepareModule, this);
preparedModuleIdList.forEach(function(id) {
moduleResolver(id);
});
return this;
// ---
// 1. Perform basic validation and index by id and alias.
function prepareModule(moduleSpec, id) {
if(!id) {
throw new ArgumentInvalidError(
"moduleSpecMap",
"Module map contains an empty module identifier.");
}
if(!moduleSpec) {
throw new ArgumentInvalidError(
"moduleSpecMap",
"Module with id '" + id + "' provides no specification.");
}
// ---
var module = this.__get(id);
if(module !== null) {
module.__configure(moduleSpec);
} else {
if(O.hasOwn(preparedModuleSpecMap, id)) {View on GitHub (pinned to f3058517a1)