-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to use provided template dao/daohome.ftl ?
PostPosted: Thu Apr 30, 2015 10:19 am 
Newbie

Joined: Fri Feb 28, 2014 9:35 am
Posts: 2
Dear,

when I configure hbmtemplate to use explicitly daohome, I get an error:

freemarker.core.InvalidReferenceException: Expression ejb3 is undefined on line 10, column 6 in dao/daohome.ftl.

yes we can see at line 10 the ejb3 statement -> https://github.com/hibernate/hibernate-tools/blob/master/src/templates/dao/daohome.ftl

How to resolve this issue ?

Thanks

as example I use an ant task throw gradle (is easy )

Code:
    def hbm2dao(final Project project){
        project.ant {
            taskdef(name: "hibernatetool",
                    classname: "org.hibernate.tool.ant.HibernateToolTask",
                    classpath: config.classPath
            )
            hibernatetool( destdir : config.srcGeneratedDir ) {
                jdbcconfiguration(
                        configurationfile:  "${config.hibernateConfigXml.path}",
                        revengfile:         "${config.hibernateRevEngXml.path}",
                        packagename:        "${project.database.basePackage}.dao"
                )
                hbmtemplate( template:"dao/daohome.ftl", filepattern: "${project.database.basePackage}/dao/{class-name}DAO.java")
                hbm2dao(
                        jdk5: true,
                        ejb3: true
                )
                classpath {
                    pathelement( path: "config" )
                }
            }
        }

    }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.