[hibernate-issues] [JIRA] (HHH-14104) Enhancement failed with AspectJ weaved generic Entity
LAdO (JIRA)
jira at hibernate.atlassian.net
Mon Jul 13 08:11:54 EDT 2020
LAdO ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1457ac20-703a-4313-96f5-fa81da333677 ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14104?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 ) HHH-14104 ( https://hibernate.atlassian.net/browse/HHH-14104?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 ) Enhancement failed with AspectJ weaved generic Entity ( https://hibernate.atlassian.net/browse/HHH-14104?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 )
Issue Type: Bug Affects Versions: 5.4.18 Assignee: Unassigned Attachments: hibernate-enhancement.zip Components: hibernate-core Created: 13/Jul/2020 05:11 AM Priority: Major Reporter: LAdO ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1457ac20-703a-4313-96f5-fa81da333677 )
Hibernate enhancement fails when using AspectJ compile time weaving on Entity with a Generic declaration and a specific Spring aspect.
The aspect weaving is started first and then the enhancement because in the opposite order the enhancement is lost.
The problem is probably with the aspect output (org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect)
Caused by: java.lang.NullPointerException
at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$Default.compile (MethodGraph.java:572)
at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$AbstractBase.compile (MethodGraph.java:465)
at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.lambda$resolveGetter$0 (ByteBuddyEnhancementContext.java:91)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent (ConcurrentHashMap.java:1660)
at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.resolveGetter (ByteBuddyEnhancementContext.java:90)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.getGetter (EnhancerImpl.java:501)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.doGetAnnotations (EnhancerImpl.java:530)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.getAnnotations (EnhancerImpl.java:509)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.hasAnnotation (EnhancerImpl.java:459)
at org.hibernate.bytecode.enhance.spi.DefaultEnhancementContext.isPersistentField (DefaultEnhancementContext.java:101)
at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.isPersistentField (ByteBuddyEnhancementContext.java:69)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.collectCollectionFields (EnhancerImpl.java:397)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.doEnhance (EnhancerImpl.java:189)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0 (EnhancerImpl.java:132)
at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite (ByteBuddyState.java:141)
at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance (EnhancerImpl.java:132)
at org.hibernate.orm.tooling.maven.MavenEnhancePlugin.doEnhancement (MavenEnhancePlugin.java:228)
A reproducible test is in attachment.
Workaround is currently revoking the declaration of the implements Serializable.
( https://hibernate.atlassian.net/browse/HHH-14104#add-comment?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14104#add-comment?atlOrigin=eyJpIjoiYzhlODQzOGU1ZDYyNDc2NGFiNDU5OWQ1NzZkZGNlOGIiLCJwIjoiaiJ9 )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100133- sha1:e1fde5c )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200713/a1711c7b/attachment.html
More information about the hibernate-issues
mailing list