{"record":{"id":"dcf92ce65ad2fb46","repo":"pentaho/pentaho-kettle","slug":"salesforceinput-error-connection","errorCode":"SalesforceInput.Error.Connection","errorMessage":"SalesforceInput.Error.Connection","messagePattern":"SalesforceInput\\.Error\\.Connection","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":375,"sourceCode":"        BaseMessages.getString( PKG, \"SalesforceInput.Log.ServerTimestamp\", getServerTimestamp() );\n      }\n\n      if ( log.isDetailed() ) {\n        log.logDetailed( BaseMessages.getString( PKG, \"SalesforceInput.Log.Connected\" ) );\n      }\n\n    } catch ( LoginFault ex ) {\n      // The LoginFault derives from AxisFault\n      ExceptionCode exCode = ex.getExceptionCode();\n      if ( exCode == ExceptionCode.FUNCTIONALITY_NOT_ENABLED\n        || exCode == ExceptionCode.INVALID_CLIENT || exCode == ExceptionCode.INVALID_LOGIN\n        || exCode == ExceptionCode.LOGIN_DURING_RESTRICTED_DOMAIN\n        || exCode == ExceptionCode.LOGIN_DURING_RESTRICTED_TIME || exCode == ExceptionCode.ORG_LOCKED\n        || exCode == ExceptionCode.PASSWORD_LOCKOUT || exCode == ExceptionCode.SERVER_UNAVAILABLE\n        || exCode == ExceptionCode.TRIAL_EXPIRED || exCode == ExceptionCode.UNSUPPORTED_CLIENT ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.InvalidUsernameOrPassword\" ) );\n      }\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.Connection\" ), ex );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Error.Connection\" ), e );\n    }\n  }\n\n  public void query( boolean specifyQuery ) throws KettleException {\n\n    if ( getBinding() == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.Exception.CanNotGetBiding\" ) );\n    }\n\n    try {\n      if ( !specifyQuery ) {\n        // check if we can query this Object\n        DescribeSObjectResult describeSObjectResult = getBinding().describeSObject( getModule() );\n        if ( describeSObjectResult == null ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"SalesforceInput.ErrorGettingObject\" ) );\n        }","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java#L357-L393","documentation":"connect() wraps any ConnectionException whose code is NOT in the recognized auth-failure list as this generic KettleException, with the original exception attached. It signals the Salesforce SOAP connection attempt failed for a reason other than the known login codes.","triggerScenarios":"connect() throwing ConnectionException with an unmapped ExceptionCode (e.g. API disabled, unknown server codes), or lower-level transport errors surfaced as ConnectionException.","commonSituations":"Salesforce API version not enabled for the org; new Salesforce error codes not yet handled by this old Kettle plugin; proxy/TLS issues surfacing as connection exceptions.","solutions":["Read the cause (KettleException#getCause) to find the real Salesforce error code.","Update the Salesforce API version / wsc dependency used by the plugin.","Check network access: proxy, firewall, and TLS settings for api.salesforce.com.","Confirm the org has the API feature enabled (Enterprise/Unlimited/Developer editions)."],"exampleFix":"// before\ncatch (ConnectionException ex) { /* unmapped code swallowed into generic message */ }\n// after\nKettleException ke = ...; // in caller\nlogError(\"Salesforce connect failed\", ke.getCause()); // inspect real code, then fix API version/proxy","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  conn.connect();\n} catch (KettleException e) {\n  logError(\"Salesforce connection failed\", e.getCause()); // inspect the unmapped ConnectionException code\n  throw e;\n}","preventionTips":["Always log/getCause() to surface the real Salesforce code.","Keep the Force.com WSC and API version current.","Verify API access is enabled for the org and user profile."],"tags":["salesforce","connection","api-request-failed","network"],"backgroundTag":"api-request-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"}