Thanks, I just implement the proper hashCode() of my object and it
works. God bless you.
Adriel
On Tue, 2007-09-18 at 10:11 +0200, Josip Mihelko wrote:
> Hi Adriel,
>
> Try this int your hashCode method:
>
> public int hashCode() {
> return 31*getName().hashCode();
> }
>
> The name-attribute is not loaded eagerly, which means it is null when
> you obtain a proxy instance from hibernate. when you call getName() the
> proxy is aware that the attribute is null and will load it from db...
> (Please someone correct me if that is not the case).
> So calling the getter should return the actual values (if your
> hibernate-session is not closed which would result in the
> LazyInitializationException).
>
> Hope this helps
> Josip
>
>
>
> adriel manalansan schrieb:
> > I tried to delete the implementation of Serializable in my BaseModel,
> > but still there is an error in my log file. The log error
> >
> > ERROR [main] ManagerBase.start(638) | Exception loading
> > sessions from persistent storage
> > java.lang.NullPointerException
> >
> > only occurs when I turn off tomcat then restart it again and refresh my
> > page. the variable Study.name became null but before I restarted it has
> > a value? How does this error occurs?
> >
> >
> > Thanks,
> > Adriel
> >
> > On Mon, 2007-09-17 at 11:20 -0300, Derek Broughton wrote:
> >
> >> adriel manalansan wrote:
> >>
> >>
> >>> Hello everybody,
> >>>
> >>> I think this is a stupid question but I really cant make it work. I am
> >>> using appfuse 1.9.4 and webwork. In appfuse, it is default that
> >>> BaseObject class implements java.io.Serializable. I have a superclass
> >>> named BaseModel:
> >>>
> >>> public abstract class BaseModel extends BaseObject implements
> >>> Serializable {
> >>>
> >> Surely that's a subclass :-)
> >>
> >> If BaseObject _does_ implement Serializable (it certainly does in appfuse
> >> 2.0), why do you need BaseModel to do so?
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]