pentaho/pentaho-kettle · error · KettleException
No metadata available to determine connection information…
Error message
No metadata available to determine connection information from.
What it means
getMonetDBConnection() refuses to build a MapiSocket when the step's meta (MonetDBBulkLoaderMeta) is null, since connection host/port/user/password can only be derived from that metadata. The message 'No metadata available to determine connection information from.' signals a lifecycle bug: the step is being used before init()/setMeta ran.
Solutions
- Ensure the step is initialized: call init(StepMetaInterface, StepDataInterface) with a fully loaded MonetDBBulkLoaderMeta before using connection methods
- When testing, construct and assign meta explicitly instead of using a bare instance
- Check for code paths that create a second MonetDBBulkLoader instance bypassing the normal Kettle lifecycle
Example fix
// before MonetDBBulkLoader loader = new MonetDBBulkLoader(); loader.getMonetDBConnection(); // meta is null // after loader.init( meta, new MonetDBBulkLoaderData() ); loader.getMonetDBConnection();
Defensive patterns
Strategy: validation
Validate before calling
// ensure initialization before any connection use
if ( loaderNotInitialized( loader ) ) { loader.init( meta, new MonetDBBulkLoaderData() ); } Type guard
boolean usable( MonetDBBulkLoader l ) { return l != null && l.getData() != null && l.meta != null; } Try / catch
try { socket = getMonetDBConnection(); } catch ( Exception e ) { if ( e.getMessage().contains( "No metadata available" ) ) { initialize step and retry once; } else rethrow; } Prevention
- Always go through the Kettle lifecycle (init before use)
- Never call helper methods on hand-constructed step instances without setting meta
- In tests, build meta explicitly before invoking connection code
- Add an assert in custom code that meta != null before connection use
When it happens
Trigger: getMonetDBConnection() is invoked (directly or via mserver-related paths) while this.meta is null - typically the step was never initialized through init(smi, sdi) or the meta was never assigned on the instance being used.
Common situations: Programmatic/ unit-test usage of MonetDBBulkLoader that skips init(); calling connection helpers on a fresh instance without loading step metadata from XML/repository.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Error invoking lifecycle listener
- Properties, Kettle systems settings, not initialised!
- The Properties systems settings are already initialised!
- The properties systems settings are already initialised!
- Unable to obtain a IUnifiedRepository instance
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/86f2447cf5ea6f76.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoader.java:618
}
return false;
}
@Override
public void dispose( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (MonetDBBulkLoaderMeta) smi;
data = (MonetDBBulkLoaderData) sdi;
super.dispose( smi, sdi );
}
protected MonetDBBulkLoaderData getData() {
return this.data;
}
protected MapiSocket getMonetDBConnection() throws Exception {
if ( this.meta == null ) {
throw new KettleException( "No metadata available to determine connection information from." );
}
DatabaseMeta dm = meta.getDatabaseMeta();
String hostname = environmentSubstitute( Const.NVL( dm.getHostname(), "" ) );
String portnum = environmentSubstitute( Const.NVL( dm.getDatabasePortNumberString(), "" ) );
String user = environmentSubstitute( Const.NVL( dm.getUsername(), "" ) );
String password = Utils.resolvePassword( variables, Const.NVL( dm.getPassword(), "" ) );
String db = environmentSubstitute( Const.NVL( dm.getDatabaseName(), "" ) );
MapiSocket mserver = getMonetDBConnection( hostname, Integer.valueOf( portnum ), user, password, db, log );
return mserver;
}
protected static MapiSocket getMonetDBConnection( String host, int port,
String user, String password, String db ) throws Exception {
return getMonetDBConnection( host, port, user, password, db, null );
}
View on GitHub (pinned to f3058517a1)