diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java b/hibernate-core/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java index 515970dda1..9edadbf2e5 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AbstractPropertyHolder.java @@ -94,10 +94,24 @@ public abstract class AbstractPropertyHolder implements PropertyHolder { } protected IllegalStateException buildExceptionFromInstantiationError(AttributeConversionInfo info, Exception e) { - return new IllegalStateException( - String.format( "Unable to instantiate AttributeConverter [%s]", info.getConverterClass().getName() ), - e - ); + if ( void.class.equals( info.getConverterClass() ) ) { + // the user forgot to set @Convert.converter + // we already know it's not a @Convert.disableConversion + return new IllegalStateException( + "Unable to instantiate AttributeConverter: you left @Convert.converter to its default value void.", + e + ); + + } + else { + return new IllegalStateException( + String.format( + "Unable to instantiate AttributeConverter [%s]", + info.getConverterClass().getName() + ), + e + ); + } } protected AttributeConverterDescriptor makeAttributeConverterDescriptor(AttributeConversionInfo conversion) {