pentaho/pentaho-kettle · error · KettleStepException

XsdValidator.Exception.GettingXSDFile

Error message

XsdValidator.Exception.GettingXSDFile

What it means

KettleStepException thrown when any Exception occurs while obtaining the XSD FileObject via KettleVFS (the catch block around getFileObject/exists). It masks the underlying cause (e.g. malformed URI, VFS provider failure, permission error).

Solutions

  1. Check the log line 'XsdValidator.Log.Error.GettingXSDFile' context and the wrapped cause for the real VFS error
  2. URL-encode special characters in the filename or simplify the path
  3. Confirm the VFS scheme/provider is available and credentials are valid
  4. Copy the XSD to a local path to isolate VFS/network issues

Example fix

// before
String xsd = "smb://server/my schemas/order.xsd"; // space breaks VFS uri
// after
String xsd = "smb://server/my%20schemas/order.xsd";
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check URI validity
URI uri = new URI(path.replace(" ", "%20")); // throws URISyntaxException before the step runs

Try / catch

try { run(); } catch (KettleStepException e) { log("GettingXSDFile: inspect VFS cause", e); throw new IOException("XSD fetch failed", e.getCause()); }

Prevention

When it happens

Trigger: KettleVFS.getInstance(...).getFileObject(...) throws — invalid URI syntax (unescaped spaces/special chars), unsupported VFS scheme, network share unreachable, or security/IO exception resolving the path.

Common situations: Filenames with spaces or non-ASCII characters not URL-encoded; s3/ftp/http VFS endpoints misconfigured; SMB/network drive not mounted on the agent running the transformation.

Understand the failure class

Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/a3e70240442d8945. Report an issue: GitHub.

Appendix: source

Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java:123

        // Is XSD file is provided?
        if ( meta.getXSDSource().equals( meta.SPECIFY_FILENAME ) ) {
          if ( meta.getXSDFilename() == null ) {
            logError( BaseMessages.getString( PKG, "XsdValidator.Log.ErrorXSDFileMissing" ) );
            throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.ErrorXSDFileMissing" ) );
          } else {
            // Is XSD file exists ?
            FileObject xsdfile = null;
            try {
              xsdfile = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( environmentSubstitute( meta.getXSDFilename() ), getTransMeta() );
              if ( !xsdfile.exists() ) {
                logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.XSDFileNotExists" ) );
                throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.XSDFileNotExists" ) );
              }

            } catch ( Exception e ) {
              logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.GettingXSDFile" ) );
              throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.GettingXSDFile" ) );
            } finally {
              try {
                if ( xsdfile != null ) {
                  xsdfile.close();
                }
              } catch ( IOException e ) {
                // Ignore errors
              }
            }
          }
        }

        // Is XSD field is provided?
        if ( meta.getXSDSource().equals( meta.SPECIFY_FIELDNAME ) ) {
          if ( meta.getXSDDefinedField() == null ) {
            logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.XSDFieldMissing" ) );
            throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.XSDFieldMissing" ) );
          } else {

View on GitHub (pinned to f3058517a1)