-->
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.  [ 4 posts ] 
Author Message
 Post subject: Exception with Ejb3TypeDeclaration.ftl
PostPosted: Mon Jun 16, 2008 11:16 am 
Newbie

Joined: Fri Jun 13, 2008 10:17 am
Posts: 18
Hibernate version: 3.2

Hi misters,

I use the template named Ejb3TypeDeclaration.ftl, in which there is the following code:



Code:
<#if ejb3?if_exists>
<#if pojo.isComponent()>
@${pojo.importType("javax.persistence.Embeddable")}
<#else>
@${pojo.importType("javax.persistence.Entity")}
@${pojo.importType("javax.persistence.Table")}(name="${clazz.table.name}"
<#if clazz.table.schema?exists>
    ,schema="${clazz.table.schema}"
</#if><#if clazz.table.catalog?exists>
    ,catalog="${clazz.table.catalog}"
</#if>
<#if pojo.needsAnnTableUniqueConstraints()>
    , uniqueConstraints = { ${pojo.generateAnnTableUniqueConstraint()} }
</#if>)
</#if>
</#if>


I use these file in my template, and there is the exception:

Code:
  freemarker.core.InvalidReferenceException: Expression pojo.needsAnnTableUniqueConstraints is undefined on line 12, column 6 in mypojo/Ejb3TypeDeclaration.ftl.



My database is hsql, with two simple tables and a join table.

Thanks,
Regards,
Slimane.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 4:05 am 
Newbie

Joined: Fri Jun 13, 2008 10:17 am
Posts: 18
It seems to be dued to the database schema...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, so if you can identify which parts of your schema that is causing the issue we can reproduce and look into it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 10:18 am 
Newbie

Joined: Fri Jun 13, 2008 10:17 am
Posts: 18
This was due to bad extra code added in parent .ftl file.
(suffix added to the class name)


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

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.