Your field is an oid, not a blob, Long seems to be the correct type for
it, and this is what the database is returning (use getObject() in your
JDBC test not getBytes()). Why do you want to you byte[] in your model,
not long? The conversion from long to byte[] is not obvious?
You could try using a Converter on your mapping to convert from Long to
byte[].