List Info

Thread: Re: Error on server side




Re: Error on server side
user name
2007-03-07 20:56:53
You are adding that DateAndTimeIndex in one of your existing
databases
right?  Not creating from scratch, right?  When I create
from scratch
DateAndTimeIndexes have no problem:

|path session |
path _ 'c:tempDateAndTimeTest'.
session _ MagmaSession openLocal: path.
session connectAs: 'c'.
mc _ MagmaCollection new
	addIndex: (MaDateAndTimeIndex attribute: #key) ;
	yourself.
mc add: (DateAndTime now) -> 'hello'.
session commit:
	[ session root at: 'mc1' put: mc ].
session

I think you are seeing already-corrupt data in your old
database..?

So far the only way I've been able to corrupt a db is due to
that bug
with compress; working on that one..


--- Hilaire Fernandes <hilaire2006laposte.net> wrote:

> By investigating step by step, I have found the
relevant piece of
> code 
> which cause the error. It is related to the addition of
a DateAndTime
> index.
> 
> My commit involves the creation of several
related/nested 
> MagmaCollection each coming with one index. The top
bottom collection
> is 
> created with a DateAndTime index:
> 
> IFIEtayageStepAchievement>>initialize
> 	super initialize.
> 	exercicesRecord := MagmaCollection new.
> 	exercicesRecord
> 		addIndex: (MaDateAndTimeIndex attribute: #endTime).
> 	cumulativeLearningGain := 0.
> 	failures := 0.
> 	successes := 0
> 
> If I remove the addIndex: it is ok.
> 
> I re-check my #endTime is really returning a
DateAndTime object.
> At first #endTime was retrieving the object from other
attribute
> object, 
> now endTime is also an instance variable, but I think
it does not
> really 
> matter.
> 
> Are there any precaution when using DateAndTime index?
> 
> Hilaire
> 
> Hilaire Fernandes a écrit :
> > I recover from a backup, and now when I am trying
to populate these
> new 
> > MagmaCollection I got a class definition unknow
error.
> > 
> > In which direction should I look at? (enclose a
capture of the
> error 
> > message)
> > 
> > Hilaire
> > 
> > 
> > Hilaire Fernandes a écrit :
> >> When populating a MagmaCollection I got error
with index, because
> I 
> >> used the wrong selector for the index. I fix
that, then I start to
> get 
> >> "class definition unknow" error
message, then my whole data is 
> >> unaccessible (lost), then from the server I
stop and restrat (even
> 
> >> restarting Squeak), and now each time I start
the Magma server I
> got 
> >> the two following messages (capture here).
> >>
> >> I am sure I do a lot of mistake when using
Magma, but now I start
> to 
> >> get anxious with it.
> > 
> >
>
------------------------------------------------------------
------------
> > 
> > 
> >
>
------------------------------------------------------------
------------
> > 
> > _______________________________________________
> > Magma mailing list
> > Magmalists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/magma

> 
> _______________________________________________
> Magma mailing list
> Magmalists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma

> 

_______________________________________________
Magma mailing list
Magmalists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/magma


Re: Error on server side
user name
2007-03-08 15:10:43
Yep, I created a *clean* copy of the relevant
MagmaCollection, I have to 
wrote some special code for that, but it could be usefull in
future for 
cleaning backup purpose. Now adding the the DateAndTime
index seems to 
be just fine. Now I will figure out to use such index.
Thanks for the tips

Hilaire


Chris Muller a écrit :
> You are adding that DateAndTimeIndex in one of your
existing databases
> right?  Not creating from scratch, right?  When I
create from scratch
> DateAndTimeIndexes have no problem:
> 
> |path session |

_______________________________________________
Magma mailing list
Magmalists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/magma


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )