pentaho/pentaho-kettle · error · MonetDbVersionException

MonetDBVersion.Exception.VersionFormatIsInvalid

MonetDBVersion.Exception.VersionFormatIsInvalid

Error message

MonetDBVersion.Exception.VersionFormatIsInvalid

What it means

MonetDbVersion.parseVersion() throws MonetDbVersionException with this message when the server's productVersion string is non-null but does not match VERSION_PATTERN (major[.minor[.patch]] style numeric version). The loader parses the version into major/minor/patch integers for feature comparisons, so any non-conforming string (or one with extra non-numeric parts) is rejected.

Solutions

  1. Check the message for the offending version string, then compare it against VERSION_PATTERN in MonetDbVersion.java and update the pattern or driver to match your server's format.
  2. Upgrade the monet-db-bulk-loader plugin (or its MonetDB driver dependency) to a build that supports your server's version string format.
  3. Pre-normalize the version string before construction: strip 'v' prefixes and non-numeric suffixes so it is major[.minor[.patch]].
  4. If you own a fork, extend VERSION_PATTERN to accept the new format; otherwise pin your MonetDB server to a version the plugin recognizes.

Example fix

// before
String ver = "oct2020-1"; // fails VERSION_PATTERN
MonetDbVersion v = new MonetDbVersion(ver); // throws VersionFormatIsInvalid
// after
String raw = dbMeta.getDatabaseProductVersion();
String ver = raw.replaceFirst("^[a-zA-Z]+", "").replaceAll("[^0-9.].*$", ""); // "2020.1"
MonetDbVersion v = new MonetDbVersion(ver);
Defensive patterns

Strategy: validation

Validate before calling

// Java: pre-check the version string against the expected format before construction
static final java.util.regex.Pattern VERSION_PATTERN =
    java.util.regex.Pattern.compile("\\d+(\\.\\d+(\\.\\d+)?)?"); // mirror MonetDbVersion.VERSION_PATTERN
static boolean isParseableVersion(String productVersion) {
  return productVersion != null && VERSION_PATTERN.matcher(productVersion).matches();
}

Type guard

// Java
static boolean hasValidVersionFormat(String productVersion) {
  return productVersion != null
      && java.util.regex.Pattern.compile("\\d+(\\.\\d+(\\.\\d+)?)?").matcher(productVersion).matches();
}

Prevention

When it happens

Trigger: Constructing MonetDbVersion with a productVersion like 'oct-2020-1', 'v11.35.7-beta', an empty string, or a build string with suffixes that fail MonetDbVersion.VERSION_PATTERN.

Common situations: Upgraded MonetDB servers that changed their version-string format (e.g. date-based release naming); a driver returning a full descriptive version line instead of the bare numeric version; connecting to a non-MonetDB endpoint whose product version is a different format.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

Thrown at plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDbVersion.java:153

  }

  /**
   * Parses string representation of MonetDb version. Sets up <code>majorVersion</code>. Also <code>minorVersion</code>
   * and <code>patchVersion</code> if they are present in the product version. Omits all other possible parts as
   * insignificant.
   *
   * @param productVersion
   *          a string representation of version
   * @throws MonetDbVersionException
   *           if productVersion is null or has incorrect format ( see {@link MonetDbVersion#VERSION_PATTERN} )
   */
  private void parseVersion( String productVersion ) throws MonetDbVersionException {
    if ( productVersion == null ) {
      throw new MonetDbVersionException( BaseMessages.getString( PKG, "MonetDBVersion.Exception.VersionIsNull" ) );
    }

    if ( !VERSION_PATTERN.matcher( productVersion ).matches() ) {
      throw new MonetDbVersionException( BaseMessages.getString( PKG,
          "MonetDBVersion.Exception.VersionFormatIsInvalid", productVersion ) );
    }

    int startIndex = 0;
    String[] versionParts = productVersion.split( SEPARATOR );
    majorVersion = Integer.valueOf( versionParts[startIndex] );
    if ( versionParts.length > 1 ) {
      minorVersion = Integer.valueOf( versionParts[startIndex + 1] );
    }
    if ( versionParts.length > 2 ) {
      patchVersion = Integer.valueOf( versionParts[startIndex + 2] );
    }

  }

  @Override
  public String toString() {
    return "MonetDbVersion: " + majorVersion + "." + minorVersion + "." + patchVersion;

View on GitHub (pinned to f3058517a1)