[Glass] External tasks do not recognize new methods after commit - only after restart !?!?!?!?!
James Foster
James at JGFoster.net
Thu Oct 29 08:34:00 PDT 2020
Hi Marten,
While not common, this sort of problem happens to me once or twice a year and is pretty confusing till you figure out what is happening.
A common cause of this problem is that the running application is using an instance of a _different_ class; and by “different class” I mean a class with a different OOP (and therefore a different MethodDictionary). The class probably has the same name and inherits from the same superclass, but is not _the same_ class so adding a method to one does not change the other. This can happen when you add or remove instance variables, because doing so will create a new class _version_. (It can also happen when you remove a class from a SymbolDictionary then reload it while another session has a reference to an instance of the old class, but this isn’t as common as simply changing an instance variable.)
So, is there a chance that you added/removed/renamed an instance variable shortly before the problem started?
Note that Jade has a dialog that offers to migrate all instances as part of a class schema change. If the instance being used in the application is committed then this should catch it.
James
> On Oct 29, 2020, at 12:42 AM, Marten Feldtmann via Glass <glass at lists.gemtalksystems.com> wrote:
>
> I noticed a problem I've never seen before:
>
> I am working with Gemstone/S 3.5.1 and Jade 2.4.6. My development cycle is the following:
>
> * Full Gemstone/S application is running with several answering Gemstone/S tasks (http)
> * I change code in Jade and do a commit
> * Then I execute something in our UI application to test the changes
>
> This works very well - but today I noticed, that when I add a new method and call it in my application the answering tasks throw an error and tell me, that they do not understand the new method. I've never seen this before :-(
>
> When I shut down the database and restart the application again everything is ok ... up to the time when I add a new method and want to execute it in the ansering tasks.
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
More information about the Glass
mailing list