Here's the file that's causing the error: http://source.appfuse.org/browse/appfuse/trunk/plugins/appfuse-maven-plugin/src/main/resources/appfuse/model/Ejb3PropertyGetAnnotation.ftl?r=trunk
It looks like join columns hasn't been implemented in the version of Hibernate Tools we're using. Unfortunately, I don't have a solution for you ATM. Matt On Wed, Jun 3, 2009 at 11:39 AM, jamp1 <ravinu...@gmail.com> wrote: > > HI Matt, > thank you for your quick response > i dont have any pojo's i am trying to use "mvn appfuse:gen-model" > it is trying to connect to my postgres database and i do have my tables > defined with foreign key relation's properly (that means i guess > one-to-many > and many-to-many). > but here pojo's are created by "mvn appfuse:gen-model" i guess using > Hibernate Tools. > > not sure if i need to do any other thing before to run 'mvn > appfuse:gen-model" > or some bug in "mvn appfuse:gen-model" code base. > > FYI > i am able to generate (pojo's,dao's,.hbm's) using "Hibernate tools" > > > > mraible wrote: > > > > Do you have any one-to-many or many-to-many relationships in your POJO. > If > > so, comment them out and try again. > > > > On Wed, Jun 3, 2009 at 11:09 AM, jamp1 <ravinu...@gmail.com> wrote: > > > >> > >> I am having same kind of issue > >> below is the stack trace > >> can you provide details on the fix. > >> > >> 09:54:03,747 ERROR freemarker.runtime - > >> Method public java.lang.String > >> org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.gen > >> > >> > erateJoinColumnsAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Conf > >> iguration) threw an exception when invoked on > >> org.hibernate.tool.hbm2x.pojo.Enti > >> tyPOJOClass(com.mycompany.app.model.ClaimDetail) > >> The problematic instruction: > >> ---------- > >> ==> ${pojo.generateJoinColumnsAnnotation(property)} [on line 11, column > >> 15 > >> in ap > >> pfuse/model/Ejb3PropertyGetAnnotation.ftl] > >> in include "Ejb3PropertyGetAnnotation.ftl" [on line 1, column 1 in > >> appfuse/mode > >> l/GetPropertyAnnotation.ftl] > >> in include "GetPropertyAnnotation.ftl" [on line 9, column 5 in > >> appfuse/model/Po > >> joPropertyAccessors.ftl] > >> in include "PojoPropertyAccessors.ftl" [on line 9, column 1 in > >> appfuse/model/Po > >> jo.ftl] > >> ---------- > >> > >> Java backtrace for programmers: > >> ---------- > >> freemarker.template.TemplateModelException: Method public > >> java.lang.String > >> org.h > >> > >> > ibernate.tool.hbm2x.pojo.EntityPOJOClass.generateJoinColumnsAnnotation(org.hiber > >> nate.mapping.Property,org.hibernate.cfg.Configuration) threw an > exception > >> when i > >> nvoked on > >> org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.mycompany.app.model. > >> ClaimDetail) > >> at > >> freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:13 > >> 6) > >> at > >> freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) > >> at > >> freemarker.core.Expression.getAsTemplateModel(Expression.java:89) > >> 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.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.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.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.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.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(TemplateHelpe > >> r.java:251) > >> at > >> org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplatePro > >> ducer.java:67) > >> at > >> org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.ja > >> va:28) > >> at > >> org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.ja > >> va:97) > >> at > >> org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.j > >> ava:146) > >> at > >> org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(Generi > >> cExporter.java:135) > >> at > >> org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.ja > >> va:41) > >> at > >> org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java > >> :126) > >> at > >> org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java > >> :95) > >> at > >> org.appfuse.mojo.HibernateExporterMojo.doExecute(HibernateExporterMoj > >> o.java:228) > >> at > >> org.appfuse.mojo.exporter.ModelGeneratorMojo.execute(ModelGeneratorMo > >> jo.java:183) > >> at > >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi > >> nManager.java:453) > >> at > >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa > >> ultLifecycleExecutor.java:559) > >> at > >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone > >> Goal(DefaultLifecycleExecutor.java:513) > >> at > >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau > >> ltLifecycleExecutor.java:483 > >> -- > >> View this message in context: > >> > http://www.nabble.com/appfuse%3Agen-model-anomaly...-tp17979188s2369p23855434.html > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > >> For additional commands, e-mail: users-h...@appfuse.dev.java.net > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/appfuse%3Agen-model-anomaly...-tp17979188s2369p23855888.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > >