{"record":{"id":"aa1380c8e01c3f73","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-of-type-get-pop-to-the-repository-for-id","errorCode":null,"errorMessage":"Unable to save step of type 'get pop' to the repository for id_step=","messagePattern":"Unable to save step of type 'get pop' to the repository for id_step=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/email-messages/impl/src/main/java/org/pentaho/di/trans/steps/mailinput/MailInputMeta.java","lineNumber":476,"sourceCode":"      rep.saveStepAttribute( id_transformation, id_step, TAG_PROXY_USERNAME, proxyUserName );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_USE_DYNAMIC_FOLDER, useDynamicFolder );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_FOLDER_FIELD, folderField );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_ROW_LIMIT, rowLimit );\n\n      rep.saveStepAttribute( id_transformation, id_step, TAG_USE_BATCH, useBatch );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_BATCH_SIZE, batchSize );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_START_MSG, start );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_END_MSG, end );\n      rep.saveStepAttribute( id_transformation, id_step, TAG_STOP_ON_ERROR, stopOnError );\n\n      for ( int i = 0; i < inputFields.length; i++ ) {\n        MailInputField field = inputFields[i];\n\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", field.getName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_column\", field.getColumnCode() );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to save step of type 'get pop' to the repository for id_step=\" + id_step, dbe );\n    }\n  }\n\n  @Override\n  public String getXML() {\n    StringBuilder retval = new StringBuilder();\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_SERVERNAME, serverName ) );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_USERNAME, userName ) );\n    retval.append( STR_6_SPACES ).append(\n      XMLHandler.addTagValue( TAG_PASSWORD, Encr.encryptPasswordIfNotUsingVariables( password ) ) );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_USE_AUTH, usingAuthentication ) );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_USE_GRANT_TYPE, grant_type) );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_AUTH_CLIENT_ID, clientId ) );\n    retval.append( STR_6_SPACES ).append(\n            XMLHandler.addTagValue( TAG_AUTH_SECRET_KEY,  Encr.encryptPasswordIfNotUsingVariables( secretKey) )  );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_AUTH_SCOPE, scope ) );\n    retval.append( STR_6_SPACES ).append( XMLHandler.addTagValue( TAG_AUTH_TOKEN_URL, tokenUrl ) );","sourceCodeStart":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/email-messages/impl/src/main/java/org/pentaho/di/trans/steps/mailinput/MailInputMeta.java#L458-L494","documentation":"MailInputMeta.saveRep() wraps a KettleDatabaseException thrown while persisting the 'Get POP' (Mail Input) step's field attributes (field_name, field_column) to the repository. It signals the repository write failed and the step metadata could not be saved; the database exception is attached as the cause.","triggerScenarios":"Calling saveRep() with a Repository whose saveStepAttribute() throws KettleDatabaseException — repository DB down, connection dropped, constraint violation, or insufficient permissions on R_STEP_ATTRIBUTE.","commonSituations":"Saving a transformation when the repository database connection has timed out, the DB user lacks write rights, or the repository schema is out of date after a Pentaho upgrade.","solutions":["Check the nested KettleDatabaseException cause for the underlying SQL error","Verify repository database connectivity (reconnect / test connection)","Confirm the DB user has INSERT/UPDATE privileges on the step attribute tables","Run the repository upgrade scripts if the schema is outdated, then retry the save"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  meta.saveRep( rep, metaStore, transMeta.getObjectId(), stepId );\n} catch ( KettleException e ) {\n  if ( e.getCause() instanceof KettleDatabaseException ) {\n    // check DB connectivity/permissions before retrying\n  }\n}","preventionTips":["Test the repository DB connection before large save operations","Ensure the repository user has write privileges on step attribute tables","Keep the repository schema upgraded to the PDI version in use"],"tags":["kettle","repository","database-write","pdi-plugin"],"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"}