Re: error in hibernate persistance service
"Michael Nash JGlobal.com" <[email protected]> Tue, 6 Jul 2004 18:48:53 -0400
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Organization | JGlobal |
| Message-ID | <20040706184853.168663ba@jglobal> |
Aleks: I'm having some problems with the new hashCode methods, not sure why... I'm not entirely sure I understand the logic of the equals() method and the getHash methods you're using. It looks like I'm getting a nosuch method error now.... java.lang.NoSuchMethodError: org.apache.commons.lang.builder.HashCodeBuilder.appendSuper(I)Lorg/apache/commons/lang/builder/HashCodeBuilder; at org.keel.apps.poll.entity.Choice.hashCode(Choice.java:215) at net.sf.hibernate.engine.Key.hashCode(Key.java:60) at java.util.HashMap.hash(HashMap.java:264) at java.util.HashMap.get(HashMap.java:320) at net.sf.hibernate.impl.SessionImpl.getEntity(SessionImpl.java:673) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:834) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:779) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at org.keel.services.persist.hibernate.HibernatePersistent.add(HibernatePersistent.java:167) at org.keel.services.persist.base.AbstractPersistentFactory.createRecords(AbstractPersistentFactory.java:587) at org.keel.services.persist.hibernate.HibernatePersistentFactory.cr eateTables(HibernatePersistentFactory.java:493) But if I use a "direct" equals() and getHash() this isn't happening. I'm not sure if this is the issue that was being seen with Hibernate, or whether it's something local, but it *does* stop the "ids" table getting built for some reason, even if you don't have app-poll enabled. Mike On Tue, 06 Jul 2004 00:40:52 +0200 Aleksandar Vidakovic <[email protected]> wrote: > The hashCode() methods are checked in app-hoj, app-poll, app-register... > > Didn't have the time to do some further checking... tell me if you still > have problems. > > Cheers, > > Aleks > > On Mon, 2004-07-05 at 17:32, Maurizio Brilli wrote: > > Aleks, > > I'm trying to sort things out, as I've realized I was building over > > half-built configurations. So I decided that, in order to understand > > which errors were caused by incoherent configurations, as I'm not > > familiar with keel's build system, at every step, I'd clear it all and > > build ex-novo the whole installation (with 'ant nonetinstall'). > > So here's what I'm up to: > > - default configuration, default persistence, hsqldb RDBMS: ok > > - default configuration, default persistence, mysql RDBMS: ok > > - default configuration, default persistence, DB2/400 RDBMS: dialect not > > implemented, so I'll have to get back to it later. > > - default configuration, hibernate persistence, hsqldb RDBMS: when > > running model 'createdb', app-poll gives error Could not return a > > reference to the Component > > (Key='org.keel.services.persist.PersistentFactory/*'). This time the > > reason is following: > > GRAVE: Could not compile the mapping document > > net.sf.hibernate.MappingException: composite-id class must override > > hashCode(): > > org.keel.apps.poll.entity.CatSec > > at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:311) > > at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243) > > at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) > > at net.sf.hibernate.cfg.Configuration.addXML(Configuration.java:206) > > at > > org.keel.services.persist.hibernate.HibernatePersistentFactory.initialize(HibernatePersistentFactory.java:297) > > So I remarked "app.poll=true" from ant.properties, rebuilt the whole > > thing (always with ant nonetinstall after having deleted all that was to > > be deleted in order to do a clean start) and model 'createdb' gave me > > this other error: > > Unable to create database tables:null, Persistence exception while > > creating default data for 'ids.ids', adding > > name:ids.ids,table_name:ids,field_values:table_name=KeelListItem > > (btw, as far as I can see, the definition of the ID table IS in > > system.xconf) > > > > Now I'd like to be honest with you, but I'd like to have a reply also > > from Michael and Shash, whom I know come from the Expresso project: I've > > started following the keel project because of a series of problems I'm > > having with Expresso. Mind you, I'm not a skilled Java programmer, still > > it took me a few hours to get Expresso working on linux, windows, and > > even the iseries. Because of the problems I was facing, I went on the > > Internet to look for an alternative framework and last week I found > > Keel. To be honest, beside the promises of a real open framework, what > > attracted me was the presence of at least two former members of the > > other project. I thought it meant they faced my same problems and found > > a way to solve them. But it looks like the contrary: I'm facing many > > more troubles in installing Keel than Expresso, and this is very > > frustrating, if you consider I'm only scratching the surface of the > > project. It might even be only the hibernate implementation that is > > faulty (unless it's me who didn't catch the philosophy...), but what > > happens if, after getting further in the implementation I wanted to > > change the Authentication or Authorization service? Consider that, just > > for a taste of it, I tried to start the default configuration with > > cocoon instead of struts, and I didn't even reach the end of the build > > process. > > Now, again, I can't consider myself anymore than a "power user", so I'd > > like you guys to be as honest with me as I was with you and tell me if > > you think it's a good idea for me to keep triyng to get keel working the > > way I need it to. > > Thank you. > > Ciao > > Maurizio > > _______________________________________________ > > User mailing list > > [email protected] > > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org > > > > _______________________________________________ > User mailing list > [email protected] > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org -- Michael Nash JGlobal Ltd Next-Generation Web Application Development and Open Source Support http://www.jglobal.com Bahamas Commerce and Trade Offshore eCommerce Hosting and Business Services http://www.bahamascommerce.com