{"record":{"id":"d733a062d463bd54","repo":"pentaho/pentaho-kettle","slug":"salesforceinput-targeturlmissing-error","errorCode":"SalesforceInput.TargetURLMissing.Error","errorMessage":"SalesforceInput.TargetURLMissing.Error","messagePattern":"SalesforceInput\\.TargetURLMissing\\.Error","errorType":"error_code","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java","lineNumber":128,"sourceCode":"    this.binding = null;\n    this.loginResult = null;\n    this.userInfo = null;\n    this.sql = null;\n    this.serverTimestamp = null;\n    this.qr = null;\n    this.startDate = null;\n    this.endDate = null;\n    this.sObjects = null;\n    this.recordsFilter = SalesforceConnectionUtils.RECORDS_FILTER_ALL;\n    this.fieldsList = null;\n    this.queryResultSize = 0;\n    this.recordsCount = 0;\n    setUsingCompression( false );\n    setRollbackAllChangesOnError( false );\n\n    // check target URL\n    if ( Utils.isEmpty( getURL() ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.TargetURLMissing.Error\" ) );\n    }\n\n    // check username\n    if ( Utils.isEmpty( getUsername() ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.UsernameMissing.Error\" ) );\n    }\n\n    if ( log.isDetailed() ) {\n      logInterface.logDetailed( BaseMessages.getString( PKG, \"SalesforceInput.Log.NewConnection\" ) );\n    }\n  }\n\n  public boolean isRollbackAllChangesOnError() {\n    return this.rollbackAllChangesOnError;\n  }\n\n  /**\n   *","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java#L110-L146","documentation":"The SalesforceConnection constructor validates required connection parameters before connecting. If the target URL (typically the Salesforce SOAP/REST endpoint, e.g. https://login.salesforce.com/services/Soap/u/{version}) is empty or null, it throws a KettleException with key SalesforceInput.TargetURLMissing.Error.","triggerScenarios":"Constructing SalesforceConnection with a step meta whose URL was never set, or where an environment variable in the URL field resolved to empty at runtime.","commonSituations":"Blank 'Target URL' / 'Connection URL' field in the Salesforce step dialog; ${SF_URL} variable not defined in the environment; login URL cleared after copy-pasting step config; test connection run on a server missing the variable.","solutions":["Set the URL field in the step dialog to the correct Salesforce endpoint (e.g. https://login.salesforce.com/services/Soap/u/XX.0)","Ensure any variable used (e.g. ${SALESFORCE_URL}) is defined for the transformation/environment","Use the Test Connection button to validate before running","Check production vs dev environment variable configuration"],"exampleFix":"// before\nurl = ${SF_ENDPOINT}   // undefined -> empty\n// after\nurl = https://login.salesforce.com/services/Soap/u/58.0\n// or define SF_ENDPOINT in the environment/kettle.properties","handlingStrategy":"validation","validationCode":"String url = environmentSubstitute( meta.getTargetURL() );\nif ( url == null || url.trim().isEmpty() ) {\n  throw new IllegalStateException( \"Salesforce target URL is empty; set it or define its variable\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  SalesforceConnection conn = new SalesforceConnection( log, url, username, password );\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains( \"TargetURLMissing\" ) ) {\n    fixConfigAndRetry();\n  } else throw e;\n}","preventionTips":["Always fill the URL field or define its environment variable in kettle.properties","Use Test Connection before scheduling transformations","Keep endpoint URLs per environment in a variables file","Re-check step config after copy-pasting between environments"],"tags":["salesforce","configuration","url","validation"],"backgroundTag":"missing-required-config-field","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"}