Bytecode enhancer is broken in 6.6.12

Description

Hi,

It seems that the bytecode enhancer is broken in 6.6.12 (compared to 6.6.11).

I’m getting a lot of errors like this one:

Here MyEmbedded is @Embeddable and is used for a field annotated with @Embedded in MyEntity.

I have an extensive test suite for my application and a lot of things are failing and some of them are even failing silently as if some behaviour changed. I will try to reproduce but I wanted to create a ticket first to make you aware of the issue.

Activity

Show:

Victor Noël last week

ok, thank you for the explanation, I will investigate that! And would there be a way to have the bytecode enhancer to fail instead of silently skipping classes?

Marco Belladelli last week

Hello , your MyEmbedded class probably has getter methods which do not correspond to fields, which goes against the Java Beans convention and is not supported for AccessType.PROPERTY. See also the JPA specification requirements for embeddable classes. This is causing bytecode enhancement to skip those classes, eventually leading to the error.

Determining an @Embeddable’s access-type is not easy, since it is derived from the entities where it is used at runtime. For this reason, we always check methods for consistency as if property access was possible (see this spec paragraph).

If you are using field-access, a possible workaround is to explicitly annotate your embeddable classes with @Access( AccessType.FIELD ) to prevent the check from skipping enhancement of those classes.

Details

Assignee

Reporter

Worked in

Components

Affects versions

Priority

Created last week
Updated last week