pentaho/pentaho-kettle · error · KettleException
Error retrieving command string
Error message
Error retrieving command string
What it means
IngresVectorwiseLoader.createCommandLine() throws this KettleException when resolving the SQL script file path (meta.getSqlPath()) through the VFS fails with a KettleFileException. It wraps the cause while building the command line that will invoke the external sql/vwload process.
Solutions
- Verify the SQL file path in the step dialog points to an existing file
- Ensure any environment variables in the path are defined at runtime
- Use the file:// scheme (or a valid scheme) and quote/escape special characters in the path
- Check the wrapped KettleFileException for the exact URI that failed
Example fix
// before
sqlPath = ${SQL_DIR}/load.sql // SQL_DIR not set
// after
sqlPath = file:///opt/etl/sql/load.sql Defensive patterns
Strategy: validation
Validate before calling
String path = environmentSubstitute(meta.getSqlPath());
if (!new File(new URI(path)).exists()) { throw new IllegalStateException("SQL file missing: " + path); } Try / catch
try { String cmdLine = loader.createCommandLine(...); } catch (KettleException e) { if (e.getCause() instanceof KettleFileException) { logError("Cannot resolve SQL path", e); } } Prevention
- Verify substituted variable values exist before runtime
- Keep SQL files in stable, versioned locations
- Use valid VFS schemes and escape special characters in paths
- Log the fully substituted path for diagnosis
When it happens
Trigger: createCommandLine() (invoked by cmd()) tries KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath())) and the VFS cannot resolve the file — bad URI, missing file, or invalid variable substitution in the path.
Common situations: SQL path variable (${Internal...} or custom) not defined at runtime; SQL file moved/deleted; path uses wrong URI scheme or contains spaces/OS-specific characters not handled by the chosen scheme.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- ChangeFileEncoding.Error.SourceFileNotExists
- file [ + ArgList[0] + ] can not be found!
- GetXMLDataDialog.Exception.FileDoesNotExist
- SFTPPut.Error.CanNotFindField
- TransMeta.Exception.InvalidXMLPath
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/bcaf7550f306baac.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ivw-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/ivwloader/IngresVectorwiseLoader.java:316
* The meta data to create the command line from
*
* @return The string to execute.
*
* @throws KettleException
* Upon any exception
*/
public String createCommandLine( IngresVectorwiseLoaderMeta meta ) throws KettleException {
StringBuilder sb = new StringBuilder( 300 );
if ( !Utils.isEmpty( meta.getSqlPath() ) ) {
try {
FileObject fileObject = KettleVFS.getInstance( getTransMeta().getBowl() )
.getFileObject( environmentSubstitute( meta.getSqlPath() ), getTransMeta() );
String sqlexec = Const.optionallyQuoteStringByOS( KettleVFS.getFilename( fileObject ) );
sb.append( sqlexec );
// sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh
} catch ( KettleFileException ex ) {
throw new KettleException( "Error retrieving command string", ex );
}
} else {
if ( meta.isUsingVwload() ) {
if ( isDetailed() ) {
logDetailed( "vwload defaults to system path" );
}
sb.append( "vwload" );
} else {
if ( isDetailed() ) {
logDetailed( "sql defaults to system path" );
}
sb.append( "sql" );
}
}
DatabaseMeta dm = meta.getDatabaseMeta();
if ( dm != null ) {
String databaseName = environmentSubstitute( Const.NVL( dm.getDatabaseName(), "" ) );View on GitHub (pinned to f3058517a1)