We're updating the issue view to help you get more done. 

Could not extract ParameterizedType representation of AttributeConverter definition

Description

When custom AttributeConverter has no explicit "implements AttributeConverter" (it is subclass of some base implementation of AttributeConverter) I got exception as below.

When I explicitly add "implements AttributeConverter" everything is ok, so there is easy workaround.

I created test case:
https://github.com/wjtk/mytests-jpa-spring
on branch "hibernate-bug", in class: wkr.testy.jpa.converters.ColorOneLetterConverter.

Exception
Caused by: org.hibernate.AssertionFailure: Could not extract ParameterizedType representation of AttributeConverter definition from AttributeConverter implementation class [wkr.testy.jpa.converters.ColorOneLetterConverter]
at org.hibernate.cfg.AttributeConverterDefinition.extractAttributeConverterParameterizedType(AttributeConverterDefinition.java:94)
at org.hibernate.cfg.AttributeConverterDefinition.<init>(AttributeConverterDefinition.java:52)
at org.hibernate.cfg.Configuration.addAttributeConverter(Configuration.java:2690)
at org.hibernate.cfg.Configuration.addAttributeConverter(Configuration.java:2641)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildHibernateConfiguration(EntityManagerFactoryBuilderImpl.java:1129)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:846)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:67)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:318)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 53 more

Environment

all in test case

Status

Assignee

Steve Ebersole

Reporter

Wojciech Krak

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.3.6
4.3.0.Final

Priority

Minor