EOModels occasionally loading too slowly?
EOModels occasionally loading too slowly?
- Subject: EOModels occasionally loading too slowly?
- From: Paul Hoadley <email@hidden>
- Date: Tue, 3 Nov 2009 20:52:29 +1030
Hello,
I am using Wonder and extending ERXApplication, but I don't think this
is Wonder-specific. WO 5.4.3.
I have an app that loads 8 EOModels, 3 in the app's Resources folder,
5 in linked frameworks. The default page makes use of an entity in
one of the models in an external framework. Every few runs, an
exception is thrown before the first page can load:
Error: java.lang.IllegalArgumentException: An object store for the
entity "Status" could not be found. Verify that the entity is defined
in an EOModel, and that the model is installed properly. To see what
models are loaded, you can try printing the return value of
EOModelGroup.defaultGroup() in your application.
The problem appears to be that not all the models have loaded by the
time that page is being displayed. Indeed, checking
EOModelGroup.defaultGroup() shows between 1 and 4 or 5 of the 8 models
have been loaded by the time that entity is needed on the default
page. Sometimes the correct model has loaded, and the page is
displayed. Other times it hasn't, and the app bails out with that
error. By the time Application.didFinishLaunching() is called,
they're all loaded.
Are the models really being loaded asynchronously as the app
launches? Is there some way I can force all of them to be loaded by
the time the first page needs that specific entity?
--
Paul.
w http://logicsquad.net/
h http://paul.hoadley.name/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden