pentaho/pentaho-kettle · error · ArgumentRequiredError
baseIdOrAlias
Error message
baseIdOrAlias
What it means
TypeMeta.isSubtypeOf(baseIdOrAlias) checks whether this type module is a subtype of the given base type. The library throws ArgumentRequiredError when called without a base argument (null/undefined), because the comparison target is meaningless without it.
Solutions
- Ensure a non-empty base id or TypeMeta instance is computed before calling isSubtypeOf
- Guard the call: if (baseId) { ... isSubtypeOf(baseId) }
- Log/inspect where baseIdOrAlias comes from to find why it is null
Example fix
// before
var isSub = someType.isSubtypeOf(cfg.baseType);
// after
if (cfg.baseType == null) throw new Error('Config baseType is required');
var isSub = someType.isSubtypeOf(cfg.baseType); Defensive patterns
Strategy: validation
Validate before calling
if (baseIdOrAlias == null) throw new Error('isSubtypeOf requires a base type id or TypeMeta'); Type guard
function isValidBase(b) { return typeof b === 'string' && b.length > 0 || b instanceof TypeMeta; } Try / catch
try { return type.isSubtypeOf(baseId); } catch (e) { if (e instanceof ArgumentRequiredError) { /* fall back: treat as not subtype */ return false; } throw e; } Prevention
- Never pass config-derived values straight into isSubtypeOf without a null check
- Resolve base ids through moduleMetaService.get once and reuse the TypeMeta
- Enable strict null checks in your own code around module metadata
When it happens
Trigger: Calling typeMeta.isSubtypeOf() with no argument, or explicitly passing null/undefined as baseIdOrAlias.
Common situations: Programmatically derived base ids that resolve to null/undefined (e.g. a config lookup returning undefined) before calling isSubtypeOf; typos in variable names passing an uninitialized value.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Must be or identify a type module.
- JdbcDriverResolver: driverId must not be null or blank
- [pentaho/messages!] Bundle path argument cannot be a single…
- [pentaho/messages!] Bundle path argument is invalid
- [pentaho/messages!] Bundle path argument is invalid
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/fa00c663ae5ef5bb.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core-ui/src/main/resources/app/pentaho/_core/module/TypeMeta.js:127
*
* @param {pentaho.module.InstanceMeta} instance - The instance module.
* @private
* @internal
*/
__addInstance: function(instance) {
var instances = O.getOwn(this, "__instances", null);
if(instances === null) {
this.__instances = instances = [];
}
instances.push(instance);
},
// endregion
/** @inheritDoc */
isSubtypeOf: function(baseIdOrAlias) {
if(!baseIdOrAlias) {
throw new ArgumentRequiredError("baseIdOrAlias");
}
var baseModule = typeof baseIdOrAlias === "string"
? core.moduleMetaService.get(baseIdOrAlias, keyArgsAssertDefined)
: baseIdOrAlias;
if(!(baseModule instanceof TypeMeta)) {
throw new ArgumentInvalidError("baseIdOrAlias", "Must be or identify a type module.");
}
var subModule = this;
do {
if(baseModule === subModule) {
return true;
}
subModule = subModule.ancestor;
} while(subModule !== null);View on GitHub (pinned to f3058517a1)