Hibernate version: core 3.2.0.cr2, ann 3.1.0.Beta10
Hi,
I just downloaded the new hibernate core 3.2.0.cr2 and get a strange error on a set annotated with @CollectionOfElements. According to the stack trace
Code:
org.hibernate.cfg.annotations.TableBinder.bind
makes a call to
Code:
org.hibernate.cfg.NamingStrategy.collectionTableName
passing in only
three strings as parameter. According to
http://fisheye.jboss.org/viewrep/Hibernate/trunk/Hibernate3/src/org/hibernate/cfg/NamingStrategy.java?r=9874 four strings are needed now.
regards
john
Annotated set
Code:
@CollectionOfElements(targetElement=Role.class)
@JoinTable(name="tblRoles",
joinColumns={@JoinColumn(name="role")}
)
public Set<Role> getRoles() {
return this.roles;
}
Stack trace
Code:
Caused by: java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.collectionTableName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
at org.hibernate.cfg.annotations.TableBinder.bind(TableBinder.java:90)
at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:769)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:442)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:403)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.annotations.CollectionBinder.bind(CollectionBinder.java:349)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1367)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:650)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:326)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:238)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:226)
at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[/quote]