{"record":{"id":"080487a39b5e61dd","repo":"pentaho/pentaho-kettle","slug":"zipfilemeta-exception-unabletosavestepinfo","errorCode":null,"errorMessage":"ZipFileMeta.Exception.UnableToSaveStepInfo","messagePattern":"ZipFileMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/zipfile/ZipFileMeta.java","lineNumber":274,"sourceCode":"      throw new KettleException( BaseMessages.getString(\n        PKG, \"ZipFileMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"sourcefilenamefield\", sourcefilenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetfilenamefield\", targetfilenamefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"baseFolderField\", baseFolderField );\n      rep.saveStepAttribute( id_transformation, id_step, \"operation_type\", getOperationTypeCode( operationType ) );\n      rep.saveStepAttribute( id_transformation, id_step, \"addresultfilenames\", addresultfilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"overwritezipentry\", overwritezipentry );\n      rep.saveStepAttribute( id_transformation, id_step, \"createparentfolder\", createparentfolder );\n      rep.saveStepAttribute( id_transformation, id_step, \"keepsourcefolder\", keepsourcefolder );\n      rep.saveStepAttribute( id_transformation, id_step, \"movetofolderfield\", movetofolderfield );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"ZipFileMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n    String error_message = \"\";\n\n    // source filename\n    if ( Utils.isEmpty( sourcefilenamefield ) ) {\n      error_message = BaseMessages.getString( PKG, \"ZipFileMeta.CheckResult.SourceFileFieldMissing\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta );\n      remarks.add( cr );\n    } else {\n      error_message = BaseMessages.getString( PKG, \"ZipFileMeta.CheckResult.TargetFileFieldOK\" );\n      cr = new CheckResult( CheckResult.TYPE_RESULT_OK, error_message, stepMeta );","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/zipfile/ZipFileMeta.java#L256-L292","documentation":"ZipFileMeta.saveRep wraps any Exception thrown while persisting the step's settings into the repository into this KettleException, with the id_step appended to the message. It means the transformation could not be saved to the repository because this step's attributes failed to write.","triggerScenarios":"saveRep throws when rep.saveStepAttribute fails — repository DB connection lost, table locked/read-only, insufficient permissions on r_step_attribute, or transaction rollback during save.","commonSituations":"Repository database down or network blip while saving; user lacking write permissions on repository tables; read-only replica used as repository; DB disk full causing write failure.","solutions":["Check the chained cause 'e' for the underlying JDBC/DB error.","Verify the repository connection is alive and retry the save (Ctrl+S).","Confirm the repository user has INSERT/UPDATE permissions on the step attribute tables.","Check DB disk space and that the repository isn't in read-only mode.","As a fallback, export the transformation to XML and work locally."],"exampleFix":"// before: saving with a read-only repository user\nrep = KettleDatabaseRepository.connect(...\"readonly_user\"...);\nrep.save(transMeta, \"myTrans\", null, true);\n// after: use a user with write privileges\nrep = KettleDatabaseRepository.connect(...\"admin\"...);\nrep.save(transMeta, \"myTrans\", null, true);","handlingStrategy":"retry","validationCode":"if (!rep.isConnected()) throw new IllegalStateException(\"Repository not connected\");\n// verify write access before saving\nrep.getDatabaseMeta().testConnectionSuccess();","typeGuard":null,"tryCatchPattern":"try {\n    rep.save(transMeta, \"myTrans\", null, true);\n} catch (KettleException e) {\n    if (e.getMessage().contains(\"UnableToSaveStepInfo\")) {\n        rep.disconnect(); rep.connect(user, pass);\n        rep.save(transMeta, \"myTrans\", null, true); // retry once\n    } else { throw e; }\n}","preventionTips":["Save with a repository user that has INSERT/UPDATE privileges.","Monitor repository DB disk space and availability before batch saves.","Export transformations to XML as a backup before repository maintenance windows."],"tags":["repository","database","metadata","persistence","kettle"],"backgroundTag":"database-write-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"}