Unable to resolve JDBC type code for column

I have a project that I’m converting over to: WF 27/HBM 6.1.5/OJDK17/Jakarta and now H cannot export the schema any more:

Caused by: org.hibernate.MappingException: Error creating SQL create commands for table : pirt.code_address_country
	at org.hibernate.tool.schema.internal.StandardTableExporter.getSqlCreateStrings(StandardTableExporter.java:174)
Caused by: org.hibernate.HibernateException: Unable to resolve JDBC type code for column `code_address_country.inactive`
	at org.hibernate.mapping.Column.getSqlType(Column.java:289)
	at org.hibernate.tool.schema.internal.StandardTableExporter.getSqlCreateStrings(StandardTableExporter.java:99)
	... 18 more
Caused by: org.hibernate.MappingException: Could not determine type for column inactive of type org.hibernate.type.internal.CustomMutabilityConvertedBasicTypeImpl: org.hibernate.MappingException
	at org.hibernate.mapping.Column.getSqlTypeCode(Column.java:221)
	at org.hibernate.mapping.Column.getSqlTypeName(Column.java:261)
	at org.hibernate.mapping.Column.getSqlType(Column.java:285)
	... 19 more
Caused by: org.hibernate.MappingException: SQLType code's does not match. mapped as 5 but is 16

It worked perfectly before with H 5.x on previous WF versions, even with OJDK 11+/17.

The class hierarchy makes extensive use of mapped super classes and generics; it looks like:

public class CodeAddressCountry extends CodeTableEntity<Integer> implements Serializable {
public abstract class CodeTableEntity<ID extends Serializable> 
	extends BaseEntityAuditFields<ID> implements Serializable {

	private Boolean inactive;

	@Column(name = "inactive", insertable = true, nullable = false, updatable = true)
	@Convert(converter = BooleanAsShortConverter.class)
	@NotNull(message = "application.anyTable.inactive.required")
	public Boolean getInactive() {
		return this.inactive;

public abstract class BaseEntityAuditFields<ID extends Serializable> extends BaseEntity<ID> {
public abstract class BaseEntity<ID extends Serializable> extends Domain<ID> {
public abstract class Domain<ID extends Serializable> implements Serializable {
	private ID id;

Where the converter is:

public class BooleanAsShortConverter implements AttributeConverter<Boolean, Short> {

	public Short convertToDatabaseColumn(Boolean attribute) {
		Short result = null;
		if ( attribute == null ) return result;
		if ( attribute ) result = 1;
		if ( !attribute ) result = 0;
		return result;

	public Boolean convertToEntityAttribute(Short dbData) {
		Boolean result = null;
		if ( dbData == null ) return result;
		if ( dbData == 0 ) result = Boolean.FALSE;
		if ( dbData == 1 ) result = Boolean.TRUE;
		return result;


I have also tried converters for String/Char (n/y, f/t) and Integer.

Same error only the JDBC type value changes. In this case, from short:
SQLType code’s does not match. mapped as 5 but is 16
to Integer:
SQLType code’s does not match. mapped as 4 but is 16

I use annotations on getters exclusively.

Try updating to 6.2.0.CR3 and let us know if you still face the same problems. Many bugs have been fixed since 6.1.5.

Will do.

Query: have you created a Hibernate patch for WF 27 for any version since 6.1.5?

Or will there be one forth coming? (Or a how-to?)

Just replace the hibernate-core and hibernate-envers JAR files in modules/system/layers/base/org/hibernate/main of your Wildfly installation. The next Wildfly version will come with Hibernate 6.2 out of the box.

You also need to update the module org.hibernate.commons-annotations to 6.0.6.Final.

That solved it. Schema created as expected.

Will install 6.0.2.CR into my WF 27 as a module next.