The issue is primarily that org.hibernate.type methods used SessionImplementor arguments in 5.1 .were changed to SharedSessionContractImplementor in 5.3.
In the process of investigating the impact of making user types binary compatible, I've been reviewing the various ways that Hibernate supports implementing user types.
User types are supported for: basic types, composite types, and collection types.
The user guide mentions:
extending PersistentBag (internal!?!)
SqlTypeDescriptor (examples using existing classes)
implementing a JavaTypeDescriptor<T> by extending AbstractTypeDescriptor<T>
Also, org.hibernate.usertype contains:
EnhancedUserType extends UserType
In addition, the testsuite includes a user type that extends org.hibernate.type.SerializableToBlobType.
In order to make user types built in 5.1 binary compatible with 5.3, we should make sure that the following packages are binary compatible:
1.1) excluding CompositeType and its subclasses (i.e., ComponentType, AnyType, EmbeddedComponentType, ObjectType)
1.2) excluding AssociationType and its subclasses (EntityType, CollectionType, AnyType and their subclasses)
1.3) excluding CustomUserType, CompositeCustomType, and CustomCollectionType (intended to be used internally by Hibernate)
1.4) excluding nested "spi" and "internal" folders
3) org.hibernate.collection, including nested "spi" and "internal" folders (since the user guide mentioned extending PersistentBag).