Re: EOUtilities.modelGroup exception?
Re: EOUtilities.modelGroup exception?
- Subject: Re: EOUtilities.modelGroup exception?
- From: William Hatch <email@hidden>
- Date: Wed, 19 Jan 2005 14:15:37 -0500
I never had any problems with the EC being valid, and I'm connecting using
the following code in the Application constructor:
dbKeys = new NSArray(new Object[]{"URL", "username", "password", "driver",
"plugin"});
dbValues = new NSArray(new Object[]{DB_URL, "", "", "", ""});
EOModel aModel = EOModelGroup.defaultGroup().modelNamed("UMAG1_03");
EOUtilities.connectWithModelNamed(new EOEditingContext(),
aModel.name(), new NSDictionary(dbValues, dbKeys));
Where DB_URL is a string I get from System.getProperties...blah blah and
then I just set the connection string as either a launch arg or in the
properties file. Been working quite well, but I was thinking that maybe
this does "something bad" based on the earlier trace. Now, one of the
fetch's involved is a model fetch, so maybe the two don't go too well
together? However, this fetch is used all over the app, and this is the
only place that this exception is occurring. Thanks Chuck.
Chuck Hill1/19/05 12:58 email@hidden
> Are you certain that the EC parameter passed is good (not null, not
> disposed, etc. etc.)? How are you connecting to database now?
>
> Chuck
>
>
> On Jan 19, 2005, at 9:16 AM, William Hatch wrote:
>
>> I recently changed the way I'm connecting to the database, and now I'm
>> getting the following exception on a sporadic basis:
>>
>> java.lang.NullPointerException
>> at
>> com.webobjects.eoaccess.EOUtilities.modelGroup(EOUtilities.java:997)
>> at
>> com.webobjects.eoaccess.EOUtilities.objectsWithFetchSpecificationAndBin
>> dings
>> (EOUtilities.java:112)
>> at com.datadynamicsofcny.Day.getDaysInRange(Day.java:228)
>> at
>> com.datadynamicsofcny.UserRequest.setUpDays(UserRequest.java:567)
>> at NewRequest.addRequest(NewRequest.java:124)
>>
> ...
>>
>> I'm not sure this has anything to do with the database, but the
>> ...modelGroup has me wondering what the problem might be. Thanks.
>> --
>> William Hatch
>> Eng. Visual Media Collection
>> Cornell Lab of Ornithology
>> Macaulay Library
>> Voice (607) 254-2116
>> Fax (607) 254-2439
>> http://birds.cornell.edu/macaulaylibrary
>>
--
William Hatch
Eng. Visual Media Collection
Cornell Lab of Ornithology
Macaulay Library
Voice (607) 254-2116
Fax (607) 254-2439
http://birds.cornell.edu/macaulaylibrary
_______________________________________________
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