Hi,
on enhancing my entity classes with the (new) gradle plugin, i am getting this:
Unable to enhance class [/Users/ml/Development/java/projects/Netstorsys/build/classes/main/de/logentis/bwh/model/ConsignmentImport.class] org.hibernate.bytecode.enhance.EnhancementException: Unable to enhance persistent attribute [de.logentis.bwh.model.ConsignmentImport:consignmentType] at org.hibernate.bytecode.enhance.spi.Enhancer.enhancePersistentAttribute(Enhancer.java:367) at org.hibernate.bytecode.enhance.spi.Enhancer.enhancePersistentAttributes(Enhancer.java:346) at org.hibernate.bytecode.enhance.spi.Enhancer.enhanceAsEntity(Enhancer.java:257) at org.hibernate.bytecode.enhance.spi.Enhancer.enhance(Enhancer.java:243) at org.hibernate.bytecode.enhance.spi.Enhancer.enhance(Enhancer.java:177) at org.hibernate.bytecode.enhance.spi.Enhancer$enhance.call(Unknown Source) at org.hibernate.tooling.gradle.EnhancerTask$_enhance_closure1.doCall(EnhancerTask.groovy:76) at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1376) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1348) at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.hibernate.tooling.gradle.EnhancerTask.enhance(EnhancerTask.groovy:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:530)
ConsignmentType is defined as following:
@Basic @Enumerated(EnumType.STRING) @Column(name = "constype") ConsignmentType consignmentType;
Also for other enums. Is there something i miss regarding enums? I just switched from openjpa to Hibernate and with openjpa enhancement, i ve never had issues with Enums.
Thanks for infos.
Marc
|