{"record":{"id":"ae48bd2da7b06d93","repo":"pentaho/pentaho-kettle","slug":"xbaseinputdialog-exception-specifyafiletouse","errorCode":null,"errorMessage":"XBaseInputDialog.Exception.SpecifyAFileToUse","messagePattern":"XBaseInputDialog\\.Exception\\.SpecifyAFileToUse","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/trans/steps/xbaseinput/XBaseInputDialog.java","lineNumber":525,"sourceCode":"  }\n\n  public void getInfo( XBaseInputMeta meta ) throws KettleStepException {\n    // copy info to Meta class (input)\n    meta.setDbfFileName( wFilename.getText() );\n    meta.setRowLimit( Const.toInt( wLimit.getText(), 0 ) );\n    meta.setRowNrAdded( wAddRownr.getSelection() );\n    meta.setRowNrField( wFieldRownr.getText() );\n\n    meta.setIncludeFilename( wInclFilename.getSelection() );\n    meta.setFilenameField( wInclFilenameField.getText() );\n\n    meta.setAcceptingFilenames( wAccFilenames.getSelection() );\n    meta.setAcceptingField( wAccField.getText() );\n    meta.setAcceptingStep( transMeta.findStep( wAccStep.getText() ) );\n    meta.setCharactersetName( wCharactersetName.getText() );\n\n    if ( Utils.isEmpty( meta.getDbfFileName() ) && !meta.isAcceptingFilenames() ) {\n      throw new KettleStepException( BaseMessages.getString( PKG, \"XBaseInputDialog.Exception.SpecifyAFileToUse\" ) );\n    }\n  }\n\n  private void ok() {\n    if ( Utils.isEmpty( wStepname.getText() ) ) {\n      return;\n    }\n\n    try {\n      stepname = wStepname.getText(); // return value\n      getInfo( input );\n    } catch ( KettleStepException e ) {\n      MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );\n      mb.setMessage( e.toString() );\n      mb.setText( BaseMessages.getString( PKG, \"System.Warning\" ) );\n      mb.open();\n    }\n    dispose();","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/trans/steps/xbaseinput/XBaseInputDialog.java#L507-L543","documentation":"Kettle's XBase input dialog throws this when the step configuration has no DBF file selected and the step is not configured to accept filenames from an incoming step. getInfo() validates the metadata as the dialog closes (via ok()) or before preview, refusing to save an XBase step that would have nothing to read.","triggerScenarios":"Clicking OK or Preview in the XBase Input dialog while the 'File' field is empty and the 'Accepting filenames' checkbox is unchecked.","commonSituations":"User creates a new XBase Input step but leaves the dbf filename blank; a copied step lost its filename; automation that fills only some dialog fields.","solutions":["Open the XBase Input step dialog and enter a .dbf file path in the File field","Or check 'Accepting filenames in the first step of the transformation' and wire a prior step that supplies filenames","Ensure the accepting-field/step options are consistent with the chosen mode"],"exampleFix":"// before (no file set, acceptingFilenames off) -> throws\nmeta.setAcceptingFilenames(false);\nmeta.setDbfFileName(null);\n// after\nmeta.setAcceptingFilenames(false);\nmeta.setDbfFileName(\"/data/customers.dbf\");\n// OR: meta.setAcceptingFilenames(true) with a preceding step providing filenames","handlingStrategy":"validation","validationCode":"// before opening/saving the step metadata\nboolean valid = !Utils.isEmpty(meta.getDbfFileName()) || meta.isAcceptingFilenames();\nif (!valid) { throw new KettleStepException(\"Specify a DBF file or enable accepting filenames\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set a dbf filename or enable 'accepting filenames' before ok()","Validate step metadata programmatically before saving transformations","When copying steps, re-check file fields are populated"],"tags":["kettle","pdi","xbase-input","step-configuration","validation"],"backgroundTag":"missing-required-argument","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"}