Re: EOModels occasionally loading too slowly?
Re: EOModels occasionally loading too slowly?
- Subject: Re: EOModels occasionally loading too slowly?
- From: Chuck Hill <email@hidden>
- Date: Tue, 3 Nov 2009 12:15:16 -0800
I've never seen this and can't think of why they would not be loaded
when the framework is referenced. Are some of the frameworks not
getting referenced until later? Does adding
NSBundle.allBundles() to the Application constructor help?
My only other idea is that you are somehow messing with application
loading.
Chuck
On Nov 3, 2009, at 3:47 AM, Paul Hoadley wrote:
On 03/11/2009, at 9:51 PM, Gennady Kushnir wrote:
Normally EOmodels are loaded on demand (when they are requested)
you may force EModel to load calling
EODatabaseContext.forceConnectionWithModel
see API for details
Thanks Gennady. So presumably my assumption about the cause here is
all wrong:
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.
If they're loaded on demand, that doesn't explain this:
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.
It certainly is defined in an EOModel, and the EOModel is sitting in
an included framework. Can anyone suggest why I might get this
error on one run, and then get normal operation on the very next
run? (I don't have to do anything between runs. Just hit stop,
launch again and see if it works.)
--
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
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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