{"record":{"id":"f0b8cc91a52ded12","repo":"pentaho/pentaho-kettle","slug":"i-don-t-know-how-to-convert-a-binary-value-to-internet","errorCode":null,"errorMessage":" : I don't know how to convert a binary value to Internet address.","messagePattern":" : I don't know how to convert a binary value to Internet address\\.","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java","lineNumber":136,"sourceCode":"          default:\n            throw new KettleValueException( toString() + \" : Unknown storage type \" + storageType + \" specified.\" );\n        }\n      case TYPE_BIGNUMBER:\n        switch ( storageType ) {\n          case STORAGE_TYPE_NORMAL:\n            return convertBigNumberToInternetAddress( (BigDecimal) object );\n          case STORAGE_TYPE_BINARY_STRING:\n            return convertBigNumberToInternetAddress( (BigDecimal) convertBinaryStringToNativeType( (byte[]) object ) );\n          case STORAGE_TYPE_INDEXED:\n            return convertBigNumberToInternetAddress( (BigDecimal) index[( (Integer) object ).intValue()] );\n          default:\n            throw new KettleValueException( toString() + \" : Unknown storage type \" + storageType + \" specified.\" );\n        }\n      case TYPE_BOOLEAN:\n        throw new KettleValueException( toString()\n          + \" : I don't know how to convert a boolean to a Internet address.\" );\n      case TYPE_BINARY:\n        throw new KettleValueException( toString()\n          + \" : I don't know how to convert a binary value to Internet address.\" );\n      case TYPE_SERIALIZABLE:\n        throw new KettleValueException( toString()\n          + \" : I don't know how to convert a serializable value to Internet address.\" );\n\n      default:\n        throw new KettleValueException( toString() + \" : Unknown type \" + type + \" specified.\" );\n    }\n  }\n\n  @Override\n  public Date getDate( Object object ) throws KettleValueException {\n    throw new KettleValueException( toStringMeta()\n      + \": it's not possible to convert from Internet Address to a date\" );\n  }\n\n  @Override\n  public Long getInteger( Object object ) throws KettleValueException {","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java#L118-L154","documentation":"There is no defined conversion from raw binary (byte[]) TYPE_BINARY data to an InetAddress in getInternetAddress(). TYPE_BINARY storage means opaque byte payloads, and this value meta refuses to interpret them as an address, throwing this KettleValueException.","triggerScenarios":"Calling getInternetAddress()/getString()/inetAddress()/getNativeDataType() on a ValueMetaInternetAddress whose type is TYPE_BINARY, e.g. when a column that previously held address strings was re-typed as binary.","commonSituations":"Binary stream fields (files, blobs) accidentally connected to an Internet Address-typed field; a change of upstream field type without updating downstream row metadata; users confusing STORAGE_TYPE_BINARY_STRING (supported) with value TYPE_BINARY (not supported).","solutions":["Change the value meta type from TYPE_BINARY to TYPE_INET (or TYPE_STRING) so the conversion path exists","Decode the bytes to a string first and convert via convertStringToInternetAddress semantics","Verify upstream field metadata matches the expected Internet Address type","Do not confuse binary-string storage with the TYPE_BINARY value type when configuring metadata"],"exampleFix":"// before\nValueMetaInterface meta = new ValueMetaInternetAddress(\"ip\", ValueMetaInterface.TYPE_BINARY);\n// after\nValueMetaInterface meta = new ValueMetaInternetAddress(\"ip\", ValueMetaInterface.TYPE_INET);","handlingStrategy":"validation","validationCode":"if (meta.getType() == ValueMetaInterface.TYPE_BINARY) {\n  throw new KettleException(\"Field \" + meta.getName() + \" is binary; expected Internet address-compatible type\");\n}","typeGuard":"boolean ok = meta.getType() != ValueMetaInterface.TYPE_BINARY\n    && meta.getType() != ValueMetaInterface.TYPE_SERIALIZABLE\n    && meta.getType() != ValueMetaInterface.TYPE_BOOLEAN;","tryCatchPattern":"try {\n  InetAddress addr = meta.getInternetAddress(object);\n} catch (KettleValueException e) {\n  if (e.getMessage().contains(\"binary value to Internet address\")) { /* retype field upstream */ }\n  throw e;\n}","preventionTips":["Do not connect binary/stream fields to address-typed fields","Distinguish TYPE_BINARY value type from STORAGE_TYPE_BINARY_STRING storage","Re-check row metadata whenever upstream field definitions change","Use Select Values to retype fields explicitly before conversion"],"tags":["kettle","pdi","type-conversion","binary"],"backgroundTag":"incompatible-source-type","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"}