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

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Change the in pom.xml to use xml parameters instead of the list.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Though HHH-9582 is marked as fixed in 5.0.0-CR2, enhancing in 5.1.0 still fails with the same error: {code} [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 {code} Here is the stack trace if build run with -X command: {code} [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 {code} I attached the same project from "HHH 9582" with dependencies on Hibernate 5.1.0.
    via by Petras,
  • Though HHH-9582 is marked as fixed in 5.0.0-CR2, enhancing in 5.1.0 still fails with the same error: {code} [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 {code} Here is the stack trace if build run with -X command: {code} [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 {code} I attached the same project from "HHH 9582" with dependencies on Hibernate 5.1.0.
    via by Petras,
  • Compilation failure in maven
    via Stack Overflow by verystrongjoe
    ,
  • First compilation error
    via GitHub by sekaijin
    ,
  • GitHub comment 2#270886121
    via GitHub by scofier
    ,
  • GitHub comment 130#275846135
    via GitHub by metalbreeze
    ,
  • Getting Java error
    via GitHub by timeglider
    ,
  • GitHub comment 17#93997525
    via GitHub by jooon
    ,
    • 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)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    33 more bugmates