{"record":{"id":"e6ad4444b54c9bb1","repo":"pentaho/pentaho-kettle","slug":"xbaseinputmeta-exception-unabletosavemetadatatorepository","errorCode":null,"errorMessage":"XBaseInputMeta.Exception.UnableToSaveMetaDataToRepository","messagePattern":"XBaseInputMeta\\.Exception\\.UnableToSaveMetaDataToRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java","lineNumber":420,"sourceCode":"    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"file_dbf\", dbfFileName );\n      rep.saveStepAttribute( id_transformation, id_step, \"limit\", rowLimit );\n      rep.saveStepAttribute( id_transformation, id_step, \"add_rownr\", rowNrAdded );\n      rep.saveStepAttribute( id_transformation, id_step, \"field_rownr\", rowNrField );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"include\", includeFilename );\n      rep.saveStepAttribute( id_transformation, id_step, \"include_field\", filenameField );\n      rep.saveStepAttribute( id_transformation, id_step, \"charset_name\", charactersetName );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"accept_filenames\", acceptingFilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"accept_field\", acceptingField );\n      if ( ( acceptingStepName == null ) && ( acceptingStep != null ) ) {\n        acceptingStepName = acceptingStep.getName();\n      }\n      rep.saveStepAttribute( id_transformation, id_step, \"accept_stepname\", acceptingStepName );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"XBaseInputMeta.Exception.UnableToSaveMetaDataToRepository\" )\n        + id_step, e );\n    }\n  }\n\n  @Override\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\n    CheckResult cr;\n\n    if ( dbfFileName == null ) {\n      if ( isAcceptingFilenames() ) {\n        if ( Utils.isEmpty( getAcceptingStepName() ) ) {\n          cr =\n            new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(\n              PKG, \"XBaseInput.Log.Error.InvalidAcceptingStepName\" ), stepMeta );","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBaseInputMeta.java#L402-L438","documentation":"Thrown by XBaseInputMeta.saveRep() when saving step attributes to the Pentaho Repository fails. The message is the localized 'UnableToSaveMetaDataToRepository' string with id_step appended. It wraps any exception from rep.saveStepAttribute calls while persisting the step's configuration.","triggerScenarios":"Saving a transformation containing an XBase Input step to a repository; any rep.saveStepAttribute(...) throws (connection loss, constraint violation, read-only repository) and is wrapped with this message plus the step's ObjectId.","commonSituations":"Repository database down or connection dropped mid-save, insufficient write permissions on repository tables, read-only repository connection, transaction/lock conflicts with another user saving concurrently.","solutions":["Check the chained cause and repository logs for the underlying save error (SQL exception, connection lost).","Verify the repository user has write permissions on the target directory/transformation.","Reconnect the repository and retry the save.","If using a database repository, check for locks or constraint violations in R_STEP_ATTRIBUTE.","Save the transformation locally (.ktr) as a workaround while repository access is restored."],"exampleFix":"// before: saving with a stale repository connection\nrepository.save( transMeta, \"path\", null, true );\n\n// after: ensure connection is alive before saving\nif ( !repository.isConnected() ) {\n  repository.connect( username, password );\n}\nrepository.save( transMeta, \"path\", null, true );","handlingStrategy":"try-catch","validationCode":"if ( repository == null || !repository.isConnected() || repository.isReadOnly() ) {\n  throw new KettleException( \"Repository not connected or read-only; cannot save step metadata\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  repository.save( transMeta, path, monitor, overwrite );\n} catch ( KettleException e ) {\n  logError( \"Repository save failed: \" + e.getCause(), e );\n  // persist a local .ktr copy while diagnosing repository access\n}","preventionTips":["Confirm write permissions on the repository before editing shared transformations.","Reconnect the repository after long idle periods (connections time out).","Avoid two users saving the same transformation simultaneously.","Keep local .ktr backups of important work."],"tags":["pdi","repository","metadata","persistence"],"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"}