{"record":{"id":"bcaf7550f306baac","repo":"pentaho/pentaho-kettle","slug":"error-retrieving-command-string","errorCode":null,"errorMessage":"Error retrieving command string","messagePattern":"Error retrieving command string","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ivw-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/ivwloader/IngresVectorwiseLoader.java","lineNumber":316,"sourceCode":"   *          The meta data to create the command line from\n   *\n   * @return The string to execute.\n   *\n   * @throws KettleException\n   *           Upon any exception\n   */\n  public String createCommandLine( IngresVectorwiseLoaderMeta meta ) throws KettleException {\n    StringBuilder sb = new StringBuilder( 300 );\n\n    if ( !Utils.isEmpty( meta.getSqlPath() ) ) {\n      try {\n        FileObject fileObject = KettleVFS.getInstance( getTransMeta().getBowl() )\n          .getFileObject( environmentSubstitute( meta.getSqlPath() ), getTransMeta() );\n        String sqlexec = Const.optionallyQuoteStringByOS( KettleVFS.getFilename( fileObject ) );\n        sb.append( sqlexec );\n        // sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh\n      } catch ( KettleFileException ex ) {\n        throw new KettleException( \"Error retrieving command string\", ex );\n      }\n    } else {\n      if ( meta.isUsingVwload() ) {\n        if ( isDetailed() ) {\n          logDetailed( \"vwload defaults to system path\" );\n        }\n        sb.append( \"vwload\" );\n      } else {\n        if ( isDetailed() ) {\n          logDetailed( \"sql defaults to system path\" );\n        }\n        sb.append( \"sql\" );\n      }\n    }\n\n    DatabaseMeta dm = meta.getDatabaseMeta();\n    if ( dm != null ) {\n      String databaseName = environmentSubstitute( Const.NVL( dm.getDatabaseName(), \"\" ) );","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ivw-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/ivwloader/IngresVectorwiseLoader.java#L298-L334","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nsqlPath = ${SQL_DIR}/load.sql  // SQL_DIR not set\n// after\nsqlPath = file:///opt/etl/sql/load.sql","handlingStrategy":"validation","validationCode":"String path = environmentSubstitute(meta.getSqlPath());\nif (!new File(new URI(path)).exists()) { throw new IllegalStateException(\"SQL file missing: \" + path); }","typeGuard":null,"tryCatchPattern":"try { String cmdLine = loader.createCommandLine(...); } catch (KettleException e) { if (e.getCause() instanceof KettleFileException) { logError(\"Cannot resolve SQL path\", e); } }","preventionTips":["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"],"tags":["kettle","vfs","file-not-found","ingres"],"backgroundTag":"file-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}