From: Deyan B. (JIRA) <no...@at...> - 2006-06-01 13:24:22
|
When there are composite keys JBoss Seam Skeleton App [beta] exporter throws an error "Expression field.value.typeName is undefined on line 35, column 6 in seam/find.jsp.ftl" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Key: HBX-670 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-670 Project: Hibernate Tools Type: Patch Components: hbm2seam Versions: 3.1.beta5 Environment: JBossIDE1.6GA, Eclipse 3.1.2, Hibernate 3.1, Oracle 10i, Linux amd64 Reporter: Deyan Bontchev Priority: Blocker Attachments: editorbean.java.ftl, find.jsp.ftl If there are composite keys in the database schema, the JBoss Seam Skeleton App [beta] exporter throws an error when parse composite identifier property: !ENTRY org.hibernate.eclipse 1 10000 2006-06-01 09:17:37.364 !MESSAGE DEBUG Worker-0 org.hibernate.tool.hbm2x.TemplateHelper - putInContext pojo=org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(persistence.data.UserFlow) !ENTRY org.hibernate.eclipse 1 10000 2006-06-01 09:17:37.377 !MESSAGE DEBUG Worker-0 org.hibernate.tool.hbm2x.TemplateHelper - putInContext clazz=org.hibernate.mapping.RootClass(persistence.data.UserFlow) !ENTRY org.hibernate.eclipse 4 40000 2006-06-01 09:17:37.381 !MESSAGE ERROR Worker-0 freemarker.runtime - !STACK 0 Expression field.value.typeName is undefined on line 35, column 6 in seam/find.jsp.ftl. The problematic instruction: ---------- ==> if-else [on line 35, column 1 in seam/find.jsp.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression field.value.typeName is undefined on line 35, column 6 in seam/find.jsp.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:121) at freemarker.core.IfBlock.accept(IfBlock.java:80) 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.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.process(Environment.java:176) at freemarker.template.Template.process(Template.java:231) at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:243) 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:97) at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:112) at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:101) at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(GenericExporter.java:84) at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:69) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93) at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:59) at org.hibernate.tool.hbm2x.seam.SeamExporter.doStart(SeamExporter.java:65) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:250) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:221) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:108) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:590) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:515) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:733) at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:931) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) When you fixed this one you will get the similar error when generates Java sources and hits composite identifier property: !ENTRY org.hibernate.eclipse 1 10000 2006-06-01 09:10:05.689 !MESSAGE DEBUG Worker-0 org.hibernate.tool.hbm2x.TemplateHelper - putInContext pojo=org.hibernate.tool.hbm2x.pojo.ComponentPOJOClass(persistence.data.FlowActionId) !ENTRY org.hibernate.eclipse 1 10000 2006-06-01 09:10:05.690 !MESSAGE DEBUG Worker-0 org.hibernate.tool.hbm2x.TemplateHelper - putInContext clazz=org.hibernate.mapping.Component([org.hibernate.mapping.Property(flowCode), org.hibernate.mapping.Property(actionId)]) !ENTRY org.hibernate.eclipse 4 40000 2006-06-01 09:10:05.693 !MESSAGE ERROR Worker-0 freemarker.runtime - !STACK 0 Expression pojo.identifierProperty is undefined on line 47, column 6 in seam/editorbean.java.ftl. The problematic instruction: ---------- ==> if pojo.identifierProperty.value.identifierGeneratorStrategy == "assigned" [on line 47, column 1 in seam/editorbean.java.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression pojo.identifierProperty is undefined on line 47, column 6 in seam/editorbean.java.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Dot._getAsTemplateModel(Dot.java:74) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:111) 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.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:231) at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:243) 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:97) at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:112) at org.hibernate.tool.hbm2x.GenericExporter.exportComponent(GenericExporter.java:97) at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(GenericExporter.java:91) at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:69) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93) at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:59) at org.hibernate.tool.hbm2x.seam.SeamExporter.doStart(SeamExporter.java:83) at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:250) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:221) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:108) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:590) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:515) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:733) at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:931) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |