Bytecode enhancement fails for generic entity types when target type is not set

Description

Trying to use the org.hibernate.orm.tooling:hibernate-enhance-maven-plugin in a Hibernate 5.2.x environment leads to an exception on the "enhance" goal when a property is mapped to a generic type without the raw type specified as target of the association.

Versus:

I'm not sure if JPA demands the target to be specified for generic types, but Hibernate without bytecode enhancement handles both mappings just fine. The bytecode enhancement however fails for the first case with:

I believe bytecode enhancement is pretty heavily reworked at the moment. Is it still sensible to propose a fix for the 5.2.x branch?

Environment

None

Activity

Show:
Sanne Grinovero
May 8, 2018, 12:03 PM

Hi yes you're right it's been reworked.

The main change is that we're switching to Byte Buddy as defualt enhancer (rather than Javassist) in Hibernate ORM 5.3, so I'm not sure if it's worth spending much time improving/fixing the Javassist based enhancer.

The option to use Byte Buddy was already available in versions 5.2.x, just not the default. Could you check if it's affected as well?

Thanks

Jan-Willem Gmelig Meyling
May 8, 2018, 12:43 PM

Just recompiled using Bytebuddy as provider, and it doesn't have this problem!

Sanne Grinovero
May 8, 2018, 1:10 PM

great to know, thanks for checking!

Assignee

Unassigned

Reporter

Jan-Willem Gmelig Meyling

Fix versions

None

Labels

None

backPortable

Backport?

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Trivial
Configure