{"record":{"id":"8c81d1f9abf6d9d3","repo":"pentaho/pentaho-kettle","slug":"repository-fixfor300required-message","errorCode":"Repository.FixFor300Required.Message","errorMessage":"Repository.FixFor300Required.Message","messagePattern":"Repository\\.FixFor300Required\\.Message","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"critical","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryConnectionDelegate.java","lineNumber":233,"sourceCode":"\n    if ( majorVersion < REQUIRED_MAJOR_VERSION\n      || ( majorVersion == REQUIRED_MAJOR_VERSION && minorVersion < REQUIRED_MINOR_VERSION ) ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"Repository.UpgradeRequired.Message\", getVersion(), getRequiredVersion() ) );\n    }\n\n    if ( majorVersion == 3 && minorVersion == 0 ) {\n      // The exception: someone upgraded the repository to version 3.0.0\n      // In that version, one column got named incorrectly.\n      // Another upgrade to 3.0.1 or later will fix that.\n      // However, since we don't have point versions in here, we'll have to look\n      // at the column in question...\n      //\n      String errorColumn = \"TRANSFORMATION\";\n      RowMetaInterface tableFields =\n        callRead( () -> database.getTableFieldsMeta( null, KettleDatabaseRepository.TABLE_R_TRANS_PARTITION_SCHEMA ) );\n      if ( tableFields.indexOfValue( errorColumn ) >= 0 ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"Repository.FixFor300Required.Message\" ) );\n      }\n    }\n  }\n\n  public synchronized void disconnect() {\n    try {\n      repository.connectionDelegate.closeStepAttributeLookupPreparedStatement();\n      repository.connectionDelegate.closeTransAttributeLookupPreparedStatement();\n      repository.connectionDelegate.closeLookupJobEntryAttribute();\n\n      for ( Map.Entry<String, PreparedStatement> entry : sqlMap.entrySet() ) {\n        PreparedStatement ps = entry.getValue();\n        try {\n          ps.close();\n        } catch ( SQLException e ) {\n          log.logError( \"Error closing prepared statement: \" + entry.getKey(), e );\n        }\n      }","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryConnectionDelegate.java#L215-L251","documentation":"Thrown by verifyVersion for the specific repository version 3.0, in which one column in R_TRANS_PARTITION_SCHEMA was created with the incorrect name \"TRANSFORMATION\". The code inspects the table's field metadata and refuses the connection when the misnamed column is present, because 3.0.0 repositories need a one-time structural fix before use.","triggerScenarios":"Connecting to a repository whose major/minor version equals 3.0 and whose TABLE_R_TRANS_PARTITION_SCHEMA contains a column named TRANSFORMATION (detected via database.getTableFieldsMeta).","commonSituations":"Using a repository upgraded to exactly Kettle 3.0.0 (the release with the misnamed column); restoring a 3.0.0-era repository backup and connecting with a newer client.","solutions":["Apply the documented 3.0.0 fix: rename the TRANSFORMATION column in R_TRANS_PARTITION_SCHEMA to its correct name (ID_TRANSFORMATION) with an ALTER TABLE","Re-run the repository upgrade/migration from the 3.0.x patch release that corrects the schema","Recreate or restore a repository from a pre-3.0 or post-3.0 backup and re-import your content"],"exampleFix":"// before (broken 3.0.0 schema)\n-- R_TRANS_PARTITION_SCHEMA( ID_..., TRANSFORMATION, ... )\n// after\nALTER TABLE R_TRANS_PARTITION_SCHEMA RENAME COLUMN TRANSFORMATION TO ID_TRANSFORMATION;","handlingStrategy":"validation","validationCode":"// detect the broken 3.0.0 column before connecting\nResultSet cols = md.getColumns(null, null, \"R_TRANS_PARTITION_SCHEMA\", \"TRANSFORMATION\");\nif (cols.next()) {\n  throw new IllegalStateException(\"Repository has the 3.0.0 schema bug; apply the column rename fix\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  repository.connect(user, pass);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"3.0\")) {\n    // trigger the documented 3.0.0 schema fix, then retry\n  } else { throw e; }\n}","preventionTips":["Never leave repositories on exactly version 3.0.0; move to a patched release","Validate repository schema after restores/upgrades","Keep the repository upgrade scripts version-controlled"],"tags":["repository","schema","version-3-0","database"],"backgroundTag":"schema-validation-failed","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"}