Error on server side

Chris Muller chris at funkyobjects.org
Thu Mar 8 02:56:53 UTC 2007


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:\temp\DateAndTimeTest'.
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 <hilaire2006 at laposte.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
> > Magma at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/magma
> 
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
> 



More information about the Magma mailing list