pentaho/pentaho-kettle · warning · IllegalArgumentException
Invalid zoom value
Error message
Invalid zoom value
What it means
TransGraph's zoom label handler parses the entered text as a percentage (/100) into a magnification. On a parse failure or an out-of-range magnification (outside MIN_ZOOM..MAX_ZOOM) it restores the previous magnification, logs 'Invalid zoom value', throws IllegalArgumentException internally, and the catch block shows the 'InvalidZoomMeasurement' dialog.
Solutions
- Type a plain numeric percentage within the supported zoom range (e.g. '150%').
- Remove any non-numeric characters or duplicate decimal points.
- Pick a value from the zoom preset drop-down rather than free text.
Example fix
// before String possibleText = "abc"; // unparsable // after String possibleText = "150"; // 1.5x magnification, in range
Defensive patterns
Strategy: validation
Validate before calling
float m;
try { m = Float.parseFloat( text ) / 100; } catch ( NumberFormatException e ) { m = -1; }
if ( m < MIN_ZOOM || m > MAX_ZOOM ) { /* reject and restore previousMagnification */ } Try / catch
try {
applyZoom( possibleText );
} catch ( Exception e ) {
magnification = previousMagnification;
modalMessageDialog( getString( "TransGraph.Dialog.InvalidZoomMeasurement.Title" ),
getString( "TransGraph.Dialog.InvalidZoomMeasurement.Message" ) );
} Prevention
- Enter numeric zoom values without letters or duplicate decimal points.
- Keep zoom within the supported range (e.g. 10%..400%).
- Use preset zoom levels instead of typing arbitrary magnifications.
When it happens
Trigger: Typing a non-numeric string or a zoom value whose /100 result is below MIN_ZOOM or above MAX_ZOOM into the TransGraph zoom label and confirming it.
Common situations: Typos like '25o%' or '1.5.0'; entering '1000%' when the max zoom is lower; pasting values copied from other tools with different zoom semantics.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- TransGraph.Dialog.InvalidZoomMeasurement.Message
- AccessInputMeta.Exception.FileDoesNotExist
- AccessOutputMeta.Exception.FileDoesNotExist
- Alert dialog cancelled by user.
- Cannot load dialog due to error in initialization.
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0f4ee34b479517f5.
Report an issue: GitHub.
Appendix: source
Thrown at ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java:1900
}
}
/**
* Allows for magnifying to any percentage entered by the user...
*/
private void readMagnification() {
float previousMagnification = magnification;
String possibleText = zoomLabel.getText();
possibleText = possibleText.replace( "%", "" );
float possibleFloatMagnification;
try {
possibleFloatMagnification = Float.parseFloat( possibleText ) / 100;
magnification = possibleFloatMagnification;
if ( magnification < MIN_ZOOM || magnification > MAX_ZOOM ) {
magnification = previousMagnification;
log.logError( "Invalid zoom value: " + zoomLabel.getText() );
throw new IllegalArgumentException( );
}
if ( zoomLabel.getText().indexOf( '%' ) < 0 ) {
zoomLabel.setText( zoomLabel.getText().concat( "%" ) );
}
} catch ( Exception e ) {
modalMessageDialog( getString( "TransGraph.Dialog.InvalidZoomMeasurement.Title" ),
getString( "TransGraph.Dialog.InvalidZoomMeasurement.Message", String.valueOf( (int) ( MIN_ZOOM * 100 ) ), String.valueOf( (int) MAX_ZOOM * 100 ) ),
SWT.YES | SWT.ICON_ERROR );
}
redraw();
}
protected void hideToolTips() {
toolTip.hide();
helpTip.hide();
toolTip.setHideDelay( TOOLTIP_HIDE_DELAY_SHORT );
}
View on GitHub (pinned to f3058517a1)