pentaho/pentaho-kettle · error · KettleDatabaseException
Error closing connection
Error message
Error closing connection
What it means
Wrapper error in OlapHelper.close(): closing the OLAP CellSet or the olap4j connection threw (the catch swallows the cause, so only this generic message surfaces). It fires during cleanup after querying, regardless of whether the query itself succeeded.
Solutions
- Verify network reachability and OLAP server state; connections often fail to close after a server-side timeout
- Close the CellSet/connection earlier or check for nulls before the helper's close()
- Chain the original exception instead of swallowing it to expose the real cause
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at engine/src/main/java/org/pentaho/di/trans/steps/olapinput/OlapHelper.java:104 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1ecdfcb038568858.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/olapinput/OlapHelper.java:104
if ( !Utils.isEmpty( mdx ) ) {
CellSet tmp = stmt.executeOlapQuery( mdx );
result = tmp;
} else {
throw new Exception( "Error executing empty MDX query" );
}
}
public void close() throws KettleDatabaseException {
try {
if ( result != null ) {
result.close();
}
if ( olapConnection != null ) {
olapConnection.close();
}
} catch ( Exception e ) {
throw new KettleDatabaseException( "Error closing connection" );
}
}
/**
* Outputs one row per tuple on the rows axis.
*
* @throws KettleDatabaseException
* in case some or other error occurs
*/
public void createRectangularOutput() throws KettleDatabaseException {
if ( result != null ) {
CellDataSet cs = OlapUtil.cellSet2Matrix( result );
AbstractBaseCell[][] headers = cs.getCellSetHeaders();
headerValues = concatHeader( headers );
cellValues = castResult( cs.getCellSetBody() );
}
}
View on GitHub (pinned to f3058517a1)