As an example, take the following SQL - it creates an ALIAS function which takes in a parameter, and returns a toString() representation of it. Specifically, the parameter is an integer.
CREATE ALIAS valueOfInteger AS $$ String valueOfInteger(Integer number) { return number.toString(); } $$;
CALL valueOfInteger (1);
This outputs "1" as you would expect.
If you then modify it slightly to instead take in a Number:
CREATE ALIAS valueOfNumber AS $$ String valueOfNumber(Number number) { return number.toString(); } $$;
SELECT valueOfNumber (1);
You would expect an identical output - but instead the error above is thrown.
It appears that in org.h2.value.DataType.getTypeFromClass(Class<?>), there is no support for the Number type, as such it treats it as a "Value.JAVA_OBJECT" and then ultimately in org.h2.value.Value.convertToJavaObject() it falls through the switch and tries to parse it with StringUtils.convertHexToBytes which fails.