Specify length
The setLength() method specifies the
total length of the opaque type:
public void setLength(int length) throws SQLException
If you are creating an opaque type from an existing Java™ class and do not specify a length, the driver creates a variable-length opaque type. If you are creating an opaque type without an existing Java™ class, you must specify a length; UDT Manager creates only fixed-length opaque types in this case.