[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newly created objects created have invalid state



Hi Gerd,

Thanks for taking a look at my problem. There's no need to proceed further 
as the problem has gone after making some changes and rebuilding the 
application.


>From: Gerd Mueller <gerd@smb-tec.com>
>Reply-To: ozone-users@ozone-db.org
>To: ozone-users@ozone-db.org
>Subject: Re: Newly created objects created have invalid state
>Date: Mon, 2 Oct 2000 10:38:06 +0200
>
>
> > The object gets created by:
> >
> > qsItemTmp = (QuestionnaireSessionItem)
> > database().createObject(QuestionnaireSessionItemImpl.class.getName(),
> > 
>0,null,"AU.com.harrison.innerview.questionnaire.QuestionnaireItem|AU.com.harrison.innerview.questionnaire.QuestionnaireSessionGroup",
> > new Object[] {qItem, this});
> >
> > Immediately after the execution of this statement the qsItemTmp object 
>has a
> > value in its response attribute which is the same as the one that was 
>set by
> > user entry during the previous program execution.
> >
> > During the creation of this object the attribute value is has not yet 
>been
> > set when the onCreate() method is called. There are no calls to the 
>method
> > that sets the attribute, and the value is not in the createObject()
> > parameters.
>
>Really strange. At the moment I've got no idea what this could be. Falko is 
>in
>vocation for the next two weeks, maybe he knows something more about it. 
>What I
>don't understand is if qsItemTmp has no name and it's not reachable from 
>any
>root object, how do you get back such and object ? Or do you delete it at 
>the
>end of the appliction execution from the database ? And if so why do you 
>store
>it at all ?

The objects will be reachable in the application. At the moment we are just 
developing and testing the application GUI interface so the  results of user 
entry aren't being stored.

>
> > I don't know if it is significant but a newly created database has a
> > nameTable.wizard file which is missing after the program has executed. 
>The
> > log file has the following entries:
> >
> > [info] (816) WizardStore: startup...
> > [info] (816) WizardStore:     no valid idTable file found...
> > [info] (816) WizardStore:     recovering...
> > [info] (816) WizardStore:     cluster: 77
> > [info] (816) WizardStore:         142 containers
> > [info] (816) WizardStore:     cluster: 3010
> > [info] (816) WizardStore:         103 containers
> > [info] (816) WizardStore:     cluster: 5
> > [info] (816) WizardStore:         369 containers
> > [info] (816) WizardStore:     614 IDs, 14 name(s))
>
>It seems that the database wasn't stopped cleanly. So the id table needs to 
>be
>recovered. Was there something unusual while shutting down the database ?
>

I don't recall if there was a problem with shutdown. It's certainly 
possible.


> > How can a newly created object have the state of an instance from a 
>previous
> > session without any explicit read and update?
>
>Really interesting question ...
>
>Best Regards,
>Gerd

The problem was discovered by the person working on the GUI and I was able 
to duplicate it on my machine. This piece of code has been executed hundreds 
of times without a problem so I expect the problem is an abnormal database 
shutdown. What concerns me is that this behavior might occur in the 
application. The only scenario that I can think of is that something like an 
ozone object cache is read into memory as a result of the recovery process. 
Even if there is such a cache I can't conceive how the cached objects would 
be 'correctly' associated with the newly created ones. Anyways as I 
mentioned at the start the latest version of the application doesn't have 
the problem so no need to spend more time on it. However I am curious about 
how it could happen so if Falko happens to know how it can occur I'd be 
interested in knowing.

Thanks again,

don
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.