From: Paul C. (JIRA) <no...@at...> - 2006-05-12 14:44:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-342?page=comments#action_23092 ] Paul Cantrell commented on ANN-342: ----------------------------------- It isn't mentioned on the annotations home page (http://www.hibernate.org/247.html). The page states the requirement as 3.2.0cr1, which by general convention means "3.2cr1 or newer" unless explicitly stated otherwise. Five minutes to add "will not work with 3.2cr2" the annotations home page right now would save other downloaders hours of headache in the time before you release. The readme.txt bundled with the annotations incorrectly states: "THIS RELEASE OF HIBERNATE ANNOTATIONS REQUIRES HIBERNATE 3.2.0.CR2 AND DOES NOT WORK WITH HIBERNATE 3.1.x OR ANY OLDER VERSION OF HIBERNATE" > Encountering NoSuchMethod error: NamingStrategy.foreignKeyColumnName(String,String):String > ------------------------------------------------------------------------------------------ > > Key: ANN-342 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-342 > Project: Hibernate Annotations > Type: Bug > Environment: Hibernate 3.2.0.cr2, Hibernate Annotations 3.1.0.Beta10, PostgreSQL 8.0, OS X 1.4.6, JDK 1.5.0_06 > Reporter: Paul Cantrell > > > I am encountering a NoSuchMethodError when Hibernate attempts to process my configuration. This suggests that my annotations and core jars are out of sync, but I do seem to have the latest versions of both. > And indeed, when I try to build hibernate-annotations, I get compile errors suggesting that the annotations were built against some code other than what I have checked out, probably 3.2cr1. > Looks like the published build of annotations is just out of sync with the latest core release...? > java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; > at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:266) > at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:198) > at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45) > at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:261) > at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205) > at net.innig.framework.persistence.hibernate.HibernateHelper.getSessionFactory(HibernateHelper.java:47) > .... > odysseus (hibernate-annotations-3.1.0.Beta10)$ ant jar > Searching for build.xml ... > Buildfile: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml > Could not load definitions from resource clovertasks. It could not be found. > init > Build Hibernate Annotations-3.1.0.Beta10 (2006-05-11 07:13:14) > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Created dir: /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/testclasses > Copying 1 file to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > Copying 2 files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build > compile > Compiling 174 source files to /usr/local/java/hibernate-annotations-3.1.0.Beta10/build/classes > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:258 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:266 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:412 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/Ejb3JoinColumn.java:420 > foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,<nulltype>,java.lang.String) > columnName = getMappings().getNamingStrategy().foreignKeyColumnName( > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/annotations/TableBinder.java:92 > collectionTableName(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy cannot be applied to (java.lang.String,java.lang.String,java.lang.String) > mappings.getNamingStrategy() > ^ > /usr/local/java/hibernate-annotations-3.1.0.Beta10/src/org/hibernate/cfg/EJB3NamingStrategy.java:12 > org.hibernate.cfg.EJB3NamingStrategy is not abstract and does not override abstract method foreignKeyColumnName(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in org.hibernate.cfg.NamingStrategy > public class EJB3NamingStrategy implements NamingStrategy { > ^ > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > 6 errors > BUILD FAILED > /usr/local/java/hibernate-annotations-3.1.0.Beta10/build.xml:40: Compile failed; see the compiler error output for details. > Total time: 10 seconds -- 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 |