pentaho/pentaho-kettle · error · KettleException
SalesforceInput.Error.QueringMore
Error message
SalesforceInput.Error.QueringMore
What it means
KettleException thrown by SalesforceConnection.queryMore() when fetching the next batch of a paginated QueryResult fails. queryMore() returns true when more records remain; any exception during the locator-based queryMore call is rethrown with 'SalesforceInput.Error.QueringMore'. It means pagination across a large result set broke mid-stream.
Solutions
- Check the cause for INVALID_SESSION_ID and reconnect() before re-running the query from the start
- Keep the session alive / increase Salesforce session timeout for long batch runs
- Restart the transformation with a smaller batch/window if the query locator expired
- Verify network stability (disable idle connection drops on proxies)
- Reduce rows fetched per call (setRowsInBatch) to shorten each batch window
Example fix
// before
while (connection.queryMore()) { rowBuffer = connection.getRecords(); }
// after
try { while (connection.queryMore()) { rowBuffer = connection.getRecords(); } }
catch (KettleException e) { connection.reconnect(); connection.query(originalSoql); /* resume */ } Defensive patterns
Strategy: retry
Validate before calling
if (!connection.testConnection()) { connection.reconnect(); } Type guard
boolean hasActiveSession(Connection c) { try { return c != null && c.getQueryResult() != null; } catch (Exception e) { return false; } } Try / catch
try { more = connection.queryMore(); } catch (KettleException e) { if (e.getCause() != null && e.getCause().getMessage().contains("INVALID_SESSION")) { connection.reconnect(); connection.query(soql); } else { throw e; } } Prevention
- Increase Salesforce session timeout for long batch jobs
- Use setRowsInBatch to keep each queryMore round-trip short
- Keep the session active during long paginations (no long idle pauses between batches)
- Re-authenticate on INVALID_SESSION_ID and restart pagination from the beginning
When it happens
Trigger: Calling queryMore() after the Salesforce session expired (query locator invalid), network interruption between batches, or the query locator timing out (Salesforce locators expire after ~15 minutes of inactivity / session end).
Common situations: Long-running transformations processing millions of rows where the session times out mid-pagination, proxy/firewall dropping idle connections between batches, Salesforce API maintenance windows.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Erreur getting fields from module [
- Error getting fields from module [
- SalesforceConnection.Exception.Query
- SalesforceInput.Error.GettingModules
- SalesforceInput.ErrorDelete
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0417cf63605e6feb.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforce/SalesforceConnection.java:680
public boolean queryMore() throws KettleException {
try {
// check the done attribute on the QueryResult and call QueryMore
// with the QueryLocator if there are more records to be retrieved
if ( !getQueryResult().isDone() ) {
this.qr = getBinding().queryMore( getQueryResult().getQueryLocator() );
this.sObjects = getQueryResult().getRecords();
if ( this.sObjects != null ) {
this.recordsCount = this.sObjects.length;
}
this.queryResultSize = getQueryResult().getSize();
return true;
} else {
// Query is done .. we finished !
return false;
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "SalesforceInput.Error.QueringMore" ), e );
}
}
public String[] getAllAvailableObjects( boolean OnlyQueryableObjects ) throws KettleException {
DescribeGlobalResult dgr = null;
List<String> objects = null;
DescribeGlobalSObjectResult[] sobjectResults = null;
try {
// Get object
dgr = getBinding().describeGlobal();
// let's get all objects
sobjectResults = dgr.getSobjects();
int nrObjects = dgr.getSobjects().length;
objects = new ArrayList<String>();
for ( int i = 0; i < nrObjects; i++ ) {
DescribeGlobalSObjectResult o = dgr.getSobjects()[i];View on GitHub (pinned to f3058517a1)