pentaho/pentaho-kettle · error · KettleValueException

API coding error: convertMeta input parameter should not be…

Error message

API coding error: convertMeta input parameter should not be equals to null

What it means

API-contract sentinel in ValueMetaBase.convertData(): the convertMeta parameter (the metadata describing the String object being converted) was passed as null, which the method explicitly forbids. This is a programmer error in the calling code, not a data problem.

Solutions

  1. Pass a non-null convertMeta (a String-typed ValueMetaInterface) when calling convertData
  2. Fix the calling code to construct or reuse proper conversion metadata
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:3991 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/bf7ee1efc11cff5b. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:3991

   * @param pol
   *          the string to be converted
   * @param convertMeta
   *          the metadata of the object (only string type) to be converted
   * @param nullIf
   *          set the object to null if pos equals nullif (IgnoreCase)
   * @param ifNull
   *          set the object to ifNull when pol is empty or null
   * @param trim_type
   *          the trim type to be used (ValueMetaInterface.TRIM_TYPE_XXX)
   * @return the object in the data type of this value metadata object
   * @throws KettleValueException
   *           in case there is a data conversion error
   */
  @Override
  public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull,
      int trim_type ) throws KettleValueException {
    if ( convertMeta == null ) {
      throw new KettleValueException( "API coding error: convertMeta input parameter should not be equals to null" );
    }
    // null handling and conversion of value to null
    //
    String null_value = nullIf;
    int inValueType = convertMeta.getType();
    int outValueType = getType();

    if ( null_value == null ) {
      switch ( inValueType ) {
        case ValueMetaInterface.TYPE_BOOLEAN:
          null_value = Const.NULL_BOOLEAN;
          break;
        case ValueMetaInterface.TYPE_STRING:
          null_value = Const.NULL_STRING;
          break;
        case ValueMetaInterface.TYPE_BIGNUMBER:
          null_value = Const.NULL_BIGNUMBER;
          break;

View on GitHub (pinned to f3058517a1)