Hibernate 5 build-time instrumentation
Issue
- With EAP 6 Hibernate 4 we use .hbm XML files for entity mapping and bytecode enhancement in the form of build-time instrumentation. The entity classes are instrumented using the ant task
org.hibernate.tool.instrument.javassist.InstrumentTask- For EAP 7 Hibernate 5 I tried to use the ant task
org.hibernate.tool.enhance.EnhancementTaskfor build-time instrumentation, but instrumentation does not work as there do not seem to be any changes applied to the bytecode. For each entity the ant task prints:
- For EAP 7 Hibernate 5 I tried to use the ant task
"[instrument] Unable to delete class file [(xyz).class]"
- The hibernate 5 documentation only mentions maven and gradle plugins for built-time instrumentation. Is the ant task for built-time instrumentation still supported with EAP 7?
- Can build-time instrumentation using ant be applied to .hbm XML mapped entities?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.0.6
- Upgrade from EAP 6 to EAP 7.x
- Upgrade from Hibernate 4 to Hibernate 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
