pentaho/pentaho-kettle · warning · KettleException
SalesforceInput.Error.ClosingConnection
Error message
SalesforceInput.Error.ClosingConnection
What it means
KettleException thrown by SalesforceConnection.close() when releasing the Salesforce binding/connection throws. close() nulls the query result and logs 'ConnectionClosed'; any exception during cleanup is rewrapped with 'SalesforceInput.Error.ClosingConnection'. It indicates cleanup of the SOAP session failed, not that the data operation failed.
Solutions
- Inspect the cause — most close failures are stale-session issues; re-authenticate before further API use
- Ensure close() is called exactly once per connection (guard with a boolean/finally)
- Treat close-time errors as non-fatal when data was already processed — log and continue
- Check Salesforce session timeout settings vs. transformation runtime
- Verify network stability to the Salesforce endpoint
Example fix
// before
connection.close(); // throws if session already dead
// after
try { connection.close(); } catch (KettleException e) { log.logMinimal("Ignore close failure: " + e.getCause()); } Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
boolean isClosable(Connection c) { return c != null; } Try / catch
try { connection.close(); } catch (KettleException e) { log.logDetailed("Close failed (likely stale session), ignoring: " + e.getCause()); } Prevention
- Close each connection exactly once, in a finally block with a null/idempotent guard
- Do not fail the transformation on close errors — data was already processed
- Increase Salesforce session timeout if transformations run long
- Monitor for repeated close failures — they usually indicate sessions being killed server-side
When it happens
Trigger: Calling close() while the underlying ConnectorClient/QueryResult access throws — e.g. getQueryResult() on a binding whose session is already invalid, or network error during session teardown.
Common situations: Double-closing a connection in step disposal logic, session already terminated server-side (admin killed session, token revoked), transient network drop during close.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- Browser session authentication requested but no JSESSIONID…
- Erreur getting fields from module [
- Error getting fields from module [
- Failed in writeToSalesForce:
- Field [ ] couldn't be found in the input stream!
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1322072aceb74bd8.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java:516
}
if ( this.binding != null ) {
this.binding = null;
}
if ( this.loginResult != null ) {
this.loginResult = null;
}
if ( this.userInfo != null ) {
this.userInfo = null;
}
if ( this.getDeletedList != null ) {
getDeletedList.clear();
getDeletedList = null;
}
if ( log.isDetailed() ) {
log.logDetailed( BaseMessages.getString( PKG, "SalesforceInput.Log.ConnectionClosed" ) );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Error.ClosingConnection" ), e );
}
}
public int getQueryResultSize() {
return this.queryResultSize;
}
public int getRecordsCount() {
return this.recordsCount;
}
public SalesforceRecordValue getRecord( int recordIndex ) {
int index = recordIndex;
SObject con = this.sObjects[index];
SalesforceRecordValue retval = new SalesforceRecordValue( index );
if ( con == null ) {
return null;View on GitHub (pinned to f3058517a1)