-->
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.  [ 2 posts ] 
Author Message
 Post subject: NamingStrategy.foreignKeyColumnName error
PostPosted: Fri Aug 11, 2006 2:43 am 
Newbie

Joined: Thu Aug 10, 2006 10:25 am
Posts: 3
Hi,
I pretty new to Hibernate. I am trying to use Hibernate annotations with Struts.
Now, I am using this plug-in for Struts I found on the Hibernate webiste (HibernatePlugin), but because I am using annotations I thought I had to change

configuration = (new Configuration()).configure(configFileURL);
_factory = configuration.buildSessionFactory();

to

configuration = (new AnnotationConfiguration()).configure(configFileURL);
_factory = configuration.buildSessionFactory();

When I am starting up my (tomcat, latest version) I got this error:

java.lang.NoSuchMethodError: org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
at org.hibernate.cfg.Ejb3JoinColumn.linkValueUsingDefaultColumnNaming(Ejb3JoinColumn.java:284)
at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:206)
at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:45)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:288)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at org.myemps.util.HibernatePlugIn.initHibernate(HibernatePlugIn.java:123)
at org.myemps.util.HibernatePlugIn.init(HibernatePlugIn.java:100)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
...

Can somebody tell me what this means (ok, I noticed the signature is org.hibernate.cfg.NamingStrategy.foreignKeyColumnName(String, String, String) and this thing is passing 4 arg (if I am reading the error right).
And the next question, how can I solve this?
I am using the the latest non-beta versions for Hibernate en Hibernate Annotations.

Thanks alot in advance :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 11, 2006 3:23 am 
Newbie

Joined: Thu Aug 10, 2006 10:25 am
Posts: 3
Oew,

I saw my post of yesterday did get posted, I thought it didn't ge through :s
Well the previous one can get deleted the

Sorry 'bout this


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.