pentaho/pentaho-kettle · error · KettleException

ResourceUtil.Exception.ErrorSerializingExportInterface

ResourceUtil.Exception.ErrorSerializingExportInterface

Error message

ResourceUtil.Exception.ErrorSerializingExportInterface

What it means

Catch-all wrapper in serializeResourceExportInterface: any exception while writing resources into the export zip (creating the zip file, writing entries, building TopLevelResource) is re-thrown as a KettleException keyed ResourceUtil.Exception.ErrorSerializingExportInterface, with the original exception attached as cause.

Solutions

  1. Read e.getCause() for the underlying IO/VFS error and fix it
  2. Ensure the target directory for zipFilename exists and is writable
  3. Verify all referenced resource files exist and are readable before exporting
  4. Check free disk space and filename validity (no illegal characters)

Example fix

// before
TopLevelResource res = ResourceUtil.serializeResourceExportInterface(zipFilename, exportable, transMeta);
// after
File out = new File(zipFilename);
if (!out.getParentFile().exists()) out.getParentFile().mkdirs();
TopLevelResource res = ResourceUtil.serializeResourceExportInterface(zipFilename, exportable, transMeta);
Defensive patterns

Strategy: try-catch

Validate before calling

File out = new File(zipFilename);
if (out.getParentFile() == null || !out.getParentFile().canWrite()) {
  throw new IllegalStateException("Export dir not writable: " + out.getParent());
}

Try / catch

try {
  return ResourceUtil.serializeResourceExportInterface(zipFilename, exportable, transMeta);
} catch (KettleException e) {
  LOG.error("Export serialization failed, cause: " + e.getCause(), e);
  throw e;
}

Prevention

When it happens

Trigger: IOException creating or writing the zip file (bad zipFilename path, disk full, permissions), VFS errors resolving resource file objects, or content write failures during the export loop.

Common situations: Export directory not writable or nonexistent; referenced resource files missing/unreadable at export time; invalid characters in the zip filename; disk quota exceeded on the export volume.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/resource/ResourceUtil.java:147

          ZipEntry zipEntry = new ZipEntry( resourceDefinition.getFilename() );

          String comment =
            BaseMessages.getString(
              PKG, "ResourceUtil.SerializeResourceExportInterface.ZipEntryComment.OriginatingFile", filename,
              Const.NVL( resourceDefinition.getOrigin(), "-" ) );
          zipEntry.setComment( comment );
          out.putNextEntry( zipEntry );

          out.write( resourceDefinition.getContent().getBytes() );
          out.closeEntry();
        }
        String zipURL = fileObject.getName().toString();
        return new TopLevelResource( topLevelResource, zipURL, "zip:" + zipURL + "!" + topLevelResource );
      } else {
        throw new KettleException( BaseMessages.getString( PKG, "ResourceUtil.Exception.NoResourcesFoundToExport" ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ResourceUtil.Exception.ErrorSerializingExportInterface", resourceExportInterface.toString() ), e );
    } finally {
      if ( out != null ) {
        try {
          out.close();
        } catch ( IOException e ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "ResourceUtil.Exception.ErrorClosingZipStream", zipFilename ) );
        }
      }
    }
  }

  public static String getExplanation( String zipFilename, String launchFile,
    ResourceExportInterface resourceExportInterface ) {

    String commandString = "";
    if ( Const.isWindows() ) {

View on GitHub (pinned to f3058517a1)