Though
HHH-9582 - hibernate-enhance-maven-plugin error: "Unable to enhance persistent attribute" Complete is marked as fixed in 5.0.0-CR2, enhancing in 5.1.0 still fails with the same error:
[ERROR] Failed to execute goal org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:5.1.0.Final:enhance (default) on project hbm-enhance-test: Unable to enhance class: hbm.test.Address: Unable to enhance persistent attribute [hbm.test.Address:country]: hbm.t
est.Country
Here is the stack trace if build run with -X command:
[ERROR] Failed to execute goal org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:5.1.0.Final:enhance (default) on project hbm-enhance-test: Unable to enhance class: hbm.test.Address: Unable to enhance persistent attribute [hbm.test.Address:country]: hbm.test.Country -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.hibernate.orm.tooling:hibernate-enhance-maven-plugin:5.1.0.Final:enhance (default) on project hbm-enhance-test: Unable to enhance class: hbm.test.Address
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
...
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to enhance class: hbm.test.Address
at org.hibernate.orm.tooling.maven.MavenEnhancePlugin.doEnhancement(MavenEnhancePlugin.java:247)
at org.hibernate.orm.tooling.maven.MavenEnhancePlugin.execute(MavenEnhancePlugin.java:153)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.hibernate.bytecode.enhance.spi.EnhancementException: Unable to enhance persistent attribute [hbm.test.Address:country]
at org.hibernate.bytecode.enhance.internal.PersistentAttributesEnhancer.enhancePersistentAttribute(PersistentAttributesEnhancer.java:111)
at org.hibernate.bytecode.enhance.internal.PersistentAttributesEnhancer.enhance(PersistentAttributesEnhancer.java:61)
at org.hibernate.bytecode.enhance.internal.CompositeEnhancer.enhance(CompositeEnhancer.java:40)
at org.hibernate.bytecode.enhance.spi.Enhancer.enhance(Enhancer.java:147)
at org.hibernate.bytecode.enhance.spi.Enhancer.enhance(Enhancer.java:87)
at org.hibernate.orm.tooling.maven.MavenEnhancePlugin.doEnhancement(MavenEnhancePlugin.java:242)
... 23 more
Caused by: javassist.NotFoundException: hbm.test.Country
at javassist.ClassPool.get(ClassPool.java:452)
at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:592)
at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:542)
at javassist.CtField.getType(CtField.java:371)
at org.hibernate.bytecode.enhance.internal.AttributeTypeDescriptor.resolve(AttributeTypeDescriptor.java:79)
at org.hibernate.bytecode.enhance.internal.PersistentAttributesEnhancer.enhancePersistentAttribute(PersistentAttributesEnhancer.java:99)
... 28 more
I attached the same project from "HHH 9582" with dependencies on Hibernate 5.1.0. |