Error while generating java code from .hbm.xml

Hi all,

After upgrade to 5.2, I can’t generate anymore javacode from .hbm.xml

org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: com.openpricer.ac.UserManagement.is.PRecentItems with template pojo/Pojo.ftl
	at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:227)
	at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:68)
	at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:29)
	at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:104)
	at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:155)
	at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:144)
	at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:48)
	at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:135)
	at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:99)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.tools.hibernate.runtime.common.Util.invokeMethod(Util.java:43)
	at org.jboss.tools.hibernate.runtime.common.AbstractExporterFacade.start(AbstractExporterFacade.java:76)
	at org.hibernate.eclipse.console.common.ConsoleExtension$1.execute(ConsoleExtension.java:219)
	at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
	at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
	at org.hibernate.eclipse.console.common.ConsoleExtension.runExporters(ConsoleExtension.java:182)
	at org.hibernate.eclipse.console.common.ConsoleExtension.launchExporters(ConsoleExtension.java:110)
	at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:266)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: freemarker.core.InvalidReferenceException: Expression clazz.getProxyInterfaceName() is undefined on line 2, column 70 in pojo/PojoEqualsHashcode.ftl.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.Expression.getStringValue(Expression.java:118)
	at freemarker.core.Expression.getStringValue(Expression.java:93)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.IfBlock.accept(IfBlock.java:82)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.Environment.visit(Environment.java:233)
	at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
	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.ConditionalBlock.accept(ConditionalBlock.java:79)
	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.IfBlock.accept(IfBlock.java:82)
	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.visit(Environment.java:233)
	at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
	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:221)
	... 25 more

Any clue or idea ?

Regards.

Hi @XavOP,

Would it be possible to open an issue in JIRA? Please attach a hbm.xml file that demonstrates the problem.

Cheers,
Koen