org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: <CUT>.ClassA with template hbm/hibernate-mapping.hbm.ftl

Hibernate JIRA | Grzegorz Aniol | 6 years ago
  1. 0

    Affected version is 3.4.0CR1. I'm running hbm2hbmxml task from ant script to generate hibernate mapping files based on annotations in entities. I'm getting an error: "Expression property.cascade is undefined on line 10, column 14 in hbm/map.hbm.ftl" for an entity which is using @ElementCollection annotation. ==================================================================== Here is the example of a class: ==================================================================== @Entity @Table(name = "configentry2") public class ClassA { @Id @Column(name = "id") private int id; @ElementCollection @MapKeyColumn(name = "key") @Column(name = "value", columnDefinition="TEXT") @CollectionTable(name = "configentry_map2", joinColumns = @JoinColumn(name = "configentry_id")) @ForeignKey(name = "fk_belongs_to_config") private Map<String, String> entries; } ==================================================================== Here is the full exception stack: ==================================================================== <CUT>\build.xml:83: org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: <CUT>.ClassA with template hbm/hibernate-mapping.hbm.ftl at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:261) at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67) at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28) at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:103) at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:148) at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:137) at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:43) at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:128) at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMappingExporter.java:34) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.Main.runBuild(Main.java:801) at org.apache.tools.ant.Main.startAnt(Main.java:218) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: freemarker.core.InvalidReferenceException: Expression property.cascade is undefined on line 10, column 14 in hbm/map.hb m.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:255) ... 27 more

    Hibernate JIRA | 6 years ago | Grzegorz Aniol
    org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: <CUT>.ClassA with template hbm/hibernate-mapping.hbm.ftl
  2. 0

    db:: 3.24::Re: Hibernate Oracle nested CURSOR 1d

    hivmr.com | 11 months ago
    org.hibernate.tool.hbm2x.ExporterException: Error while processing template view/list.xhtml.ftl
  3. 0

    db:: 3.68::Hibernate 3 + Spring 3 error on deployment mx

    hivmr.com | 5 months ago
    org.hibernate.tool.hbm2x.ExporterException: Error while processing template view/list.xhtml.ftl
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Affected version is 3.4.0CR1. I'm running hbm2hbmxml task from ant script to generate hibernate mapping files based on annotations in entities. I'm getting an error: "Expression property.cascade is undefined on line 10, column 14 in hbm/map.hbm.ftl" for an entity which is using @ElementCollection annotation. ==================================================================== Here is the example of a class: ==================================================================== @Entity @Table(name = "configentry2") public class ClassA { @Id @Column(name = "id") private int id; @ElementCollection @MapKeyColumn(name = "key") @Column(name = "value", columnDefinition="TEXT") @CollectionTable(name = "configentry_map2", joinColumns = @JoinColumn(name = "configentry_id")) @ForeignKey(name = "fk_belongs_to_config") private Map<String, String> entries; } ==================================================================== Here is the full exception stack: ==================================================================== <CUT>\build.xml:83: org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: <CUT>.ClassA with template hbm/hibernate-mapping.hbm.ftl at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:261) at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67) at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28) at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:103) at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:148) at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:137) at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:43) at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:128) at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMappingExporter.java:34) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95) at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.Main.runBuild(Main.java:801) at org.apache.tools.ant.Main.startAnt(Main.java:218) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: freemarker.core.InvalidReferenceException: Expression property.cascade is undefined on line 10, column 14 in hbm/map.hb m.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:255) ... 27 more

    Hibernate JIRA | 6 years ago | Grzegorz Aniol
    mapping.hbm.ftl
  6. 0

    FreeMarker Template Error

    oreports | 8 years ago | jenwheel
    freemarker.core.InvalidReferenceException: Expression error is undefined on line 4, column 50 in template/simple/actionerror.ftl.

  1. asdasd 485 times, last 2 months ago
  2. dafman 1 times, last 3 months ago
  3. abrazeneb 3 times, last 4 months ago
  4. Adarro 2 times, last 4 months ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. freemarker.core.InvalidReferenceException

    Expression property.cascade is undefined on line 10, column 14 in hbm/map.hb m.ftl.

    at freemarker.core.TemplateObject.assertNonNull()
  2. FreeMarker
    Template.process
    1. freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
    2. freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121)
    3. freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
    4. freemarker.core.Environment.visit(Environment.java:196)
    5. freemarker.core.MixedContent.accept(MixedContent.java:92)
    6. freemarker.core.Environment.visit(Environment.java:196)
    7. freemarker.core.Environment.include(Environment.java:1375)
    8. freemarker.core.Include.accept(Include.java:155)
    9. freemarker.core.Environment.visit(Environment.java:196)
    10. freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
    11. freemarker.core.Environment.visit(Environment.java:196)
    12. freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
    13. freemarker.core.Environment.visit(Environment.java:351)
    14. freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
    15. freemarker.core.Environment.visit(Environment.java:196)
    16. freemarker.core.MixedContent.accept(MixedContent.java:92)
    17. freemarker.core.Environment.visit(Environment.java:196)
    18. freemarker.core.Environment.include(Environment.java:1375)
    19. freemarker.core.Include.accept(Include.java:155)
    20. freemarker.core.Environment.visit(Environment.java:196)
    21. freemarker.core.MixedContent.accept(MixedContent.java:92)
    22. freemarker.core.Environment.visit(Environment.java:196)
    23. freemarker.core.Environment.process(Environment.java:176)
    24. freemarker.template.Template.process(Template.java:232)
    24 frames
  3. Hibernate Tools
    AbstractExporter.start
    1. org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:255)
    2. org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
    3. org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
    4. org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:103)
    5. org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:148)
    6. org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:137)
    7. org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:43)
    8. org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:128)
    9. org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMappingExporter.java:34)
    10. org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
    10 frames
  4. A Hibernate O/RM Module
    HibernateToolTask.execute
    1. org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
    2. org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
    2 frames
  5. Ant
    UnknownElement.execute
    1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  7. Ant
    Main.startAnt
    1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    2. org.apache.tools.ant.Task.perform(Task.java:348)
    3. org.apache.tools.ant.Target.execute(Target.java:390)
    4. org.apache.tools.ant.Target.performTasks(Target.java:411)
    5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    6. org.apache.tools.ant.Project.executeTarget(Project.java:1366)
    7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    8. org.apache.tools.ant.Project.executeTargets(Project.java:1249)
    9. org.apache.tools.ant.Main.runBuild(Main.java:801)
    10. org.apache.tools.ant.Main.startAnt(Main.java:218)
    10 frames
  8. Apache Ant Launcher
    Launcher.main
    1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    2 frames