Re: error in hibernate persistance service
Maurizio Brilli <[email protected]> Mon, 05 Jul 2004 17:32:05 +0200
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
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