Re: error in hibernate persistance service
"Shash Chatterjee" <[email protected]> Thu, 1 Jul 2004 11:21:49 -0600
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
I have watched Aleks implement equals() and hashCode() methods in some of the
entity classes, I assume for Hibernate. At the bottom is an example from the
UserGroup class. You could do the same for the entity listed in the error
message. Or, you could simply comment out "app.poll=true" in your
ant.properties, do a "ant clean" and build again (assuming you don't need
app-poll).
HTH,
Shash
/**
* @see java.lang.Object#equals(Object)
*/
public boolean equals(Object object) {
if (!(object instanceof GroupMembers)) {
return false;
}
GroupMembers rhs = (GroupMembers) object;
return new EqualsBuilder().appendSuper(super.equals(object)).append(
this.uid,
rhs.uid).append(this.groupName, rhs.groupName).isEquals();
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return new HashCodeBuilder(456747795, -1832782441).appendSuper(
super.hashCode()).append(this.uid).append(this.groupName)
.toHashCode();
}
> Maurizio Brilli ha scritto:
>
> > Hi everybody,
> > though Aleks' instructions stopped right were I had already arrived,
> > I'm trying to go ahead on my own. Now I'm stuck after building the
> > project with "ant nonetinstall".
> > The tomcat server starts regularly, but, when I try the "createdb"
> > model, I get the following error:
> >
> > null, Could not return a reference to the Component
> > (Key='org.keel.services.persist.PersistentFactory/*')
> >
> > Any clues?
> > Ciao
> > Maurizio
> >
> > _______________________________________________
> > User mailing list
> > [email protected]
> > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
> >
> By double-checking the Tomcat output, I found two instances of
> following error before the one I cited in my previous message:
>
> GRAVE: Could not compile the mapping document
> net.sf.hibernate.MappingException: composite-id class must override
> equals(): or
> g.keel.apps.poll.entity.CatSec
> at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:305)
>
> Does this make any sense to anybody?
> Ciao
> Maurizio
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org