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

No PropertyTypeExtractor available for type void in CompositeUserType

Description

Hi,

I'm trying to update from hibernate 5.2.18 to 5.4.4 and I'm facing a regression with a type in CompositeUserType that hibernate can't handle.

To simplify my problem, I have the following “Population”entity, containing a non entity “Matrix” object:

1 2 3 4 // Some comments here public class Population { public Matrix effective; }

And the following xml mapping:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping" xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping classpath://org/hibernate/hibernate-mapping-4.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-access="field" auto-import="true" package="fr.mycompany.mypackage"> <class name="fr.mycompany.mypackage.entities.Population" table="population" abstract="false"> <property name="effective" access="field" type="fr.mycompany.mypackage.types.hibernate.MatrixType"> <column name="effective_name"/> <column name="effective_dim"/> <column name="effective_dimNames"/> <column name="effective_semantics"/> <column name="effective_data"/> </property> </class> </hibernate-mapping>

 

“Matrix” object can be resumed as:

 

1 2 3 4 5 6 public class Matrix { protected String name; protected List<String> dimNames; protected List<?>[] semantics; protected Object data; }

 

Since, update, hibernate complains about a strange type into 'Matrix' object : java.util.List<?>[]
It's ok, that hibernate can't handle that, but why does hibernate throw the following error for a field inside a CompositeUserType ?

1 2 3 4 5 6 7 8 9 10 11 java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXType(JavaReflectionManager.java:217) at org.hibernate.annotations.common.reflection.java.JavaXMethod.create(JavaXMethod.java:27) at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getXMethod(JavaReflectionManager.java:181) at org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredMethods(JavaXClass.java:120) at org.hibernate.jpa.event.internal.CallbackBuilderLegacyImpl.resolveEmbeddableCallbacks(CallbackBuilderLegacyImpl.java:251) at org.hibernate.jpa.event.internal.CallbackBuilderLegacyImpl.buildCallbacksForEmbeddable(CallbackBuilderLegacyImpl.java:91) at org.hibernate.event.service.internal.EventListenerRegistryImpl.prepare(EventListenerRegistryImpl.java:153) at org.hibernate.internal.SessionFactoryImpl.prepareEventListeners(SessionFactoryImpl.java:402) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:212) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)

 

Environment

None

Status

Assignee

Unassigned

Reporter

Chatellier Eric

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.18

Components

Affects versions

5.4.4
5.3.10

Priority

Major