{"record":{"id":"bf7ee1efc11cff5b","repo":"pentaho/pentaho-kettle","slug":"api-coding-error-convertmeta-input-parameter-should-not-be","errorCode":null,"errorMessage":"API coding error: convertMeta input parameter should not be equals to null","messagePattern":"API coding error: convertMeta input parameter should not be equals to null","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java","lineNumber":3991,"sourceCode":"   * @param pol\n   *          the string to be converted\n   * @param convertMeta\n   *          the metadata of the object (only string type) to be converted\n   * @param nullIf\n   *          set the object to null if pos equals nullif (IgnoreCase)\n   * @param ifNull\n   *          set the object to ifNull when pol is empty or null\n   * @param trim_type\n   *          the trim type to be used (ValueMetaInterface.TRIM_TYPE_XXX)\n   * @return the object in the data type of this value metadata object\n   * @throws KettleValueException\n   *           in case there is a data conversion error\n   */\n  @Override\n  public Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull,\n      int trim_type ) throws KettleValueException {\n    if ( convertMeta == null ) {\n      throw new KettleValueException( \"API coding error: convertMeta input parameter should not be equals to null\" );\n    }\n    // null handling and conversion of value to null\n    //\n    String null_value = nullIf;\n    int inValueType = convertMeta.getType();\n    int outValueType = getType();\n\n    if ( null_value == null ) {\n      switch ( inValueType ) {\n        case ValueMetaInterface.TYPE_BOOLEAN:\n          null_value = Const.NULL_BOOLEAN;\n          break;\n        case ValueMetaInterface.TYPE_STRING:\n          null_value = Const.NULL_STRING;\n          break;\n        case ValueMetaInterface.TYPE_BIGNUMBER:\n          null_value = Const.NULL_BIGNUMBER;\n          break;","sourceCodeStart":3973,"sourceCodeEnd":4009,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java#L3973-L4009","documentation":"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.","triggerScenarios":"Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:3991 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null convertMeta (a String-typed ValueMetaInterface) when calling convertData","Fix the calling code to construct or reuse proper conversion metadata"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}