Skip to content

AbstractHeuristicUserType tries to instantiate deprecated TypeResolver with wrong parameters #82

@MichaelHegner

Description

@MichaelHegner

I tried to update Hibernate 5.3.7 and org.jadira.usertype.usertype.core 7.0.0.CR1 and facing following issue. => NoSuchMethodError: org.hibernate.type.TypeResolver: method ()V not found

The Problem I figured out:

AbstractHeuristicUserType uses new TypeResolver()

final AbstractSingleColumnStandardBasicType<? extends Object> heuristicType = (AbstractSingleColumnStandardBasicType<? extends Object>) new TypeResolver().heuristicType(identifierType.getName(), parameters);
		if (heuristicType == null) {
			throw new HibernateException("Unsupported identifier type " + identifierType.getName());
		}

But TypeResolver in Hibernate 5.3.7 doesn't have no arguments constructor any more:

public TypeResolver(TypeConfiguration typeConfiguration, TypeFactory typeFactory){
		this.typeConfiguration = typeConfiguration;
		this.typeFactory = typeFactory;
	}
// ATTENTION; CONSTRUCTOR COMMENTED OUT!
//	public TypeResolver() {
//		this( new BasicTypeRegistry(), new TypeFactory() );
//	}
//

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions