Re: Interface file not loaded (solved)
Re: Interface file not loaded (solved)
- Subject: Re: Interface file not loaded (solved)
- From: "Cheong Hee (Gmail)" <email@hidden>
- Date: Thu, 15 Sep 2011 16:05:48 +0800
Looks we have more respondents in at this hours in this time zone now : )
In IBusinessUnitKeyValueParameters.java.....
package com.rhino.util.interfaces;
public interface IBusinessUnitKeyValueParameters {
public static final String NEW_BUSINESS = "New Business";
public static final String NEW_BUSINESS_ABBR = "NEW";
public static final String PROFESSIONAL_SERVICES = "Professional
Services";
public static final String PROFESSIONAL_SERVICES_ABBR = "PS";
public static final String TRADITIONAL_BUSINESS = "Traditional
Business";
public static final String TRADITIONAL_BUSINESS_ABBR = "TRAD";
public static final String MANAGED_SERVICES = "Managed Services";
public static final String MANAGED_SERVICES_ABBR = "MS";
public static final String BACK_OFFICE = "Back Office";
public static final String BACK_OFFICE_ABBR = "BO";
public static final String CUSTOMER_SERVICES = "Customer Services";
public static final String CUSTOMER_SERVICES_ABBR = "CS";
public static final String UNDEFINED = "Undefined";
public static final String UNDEFINED_ABBR = "NA";
public static final String DEFAULT_TEMPLATE = BACK_OFFICE;
}
Whereas the calling method in RSUserDefaults.java that triggers the
exception is as the following:
public void setConnectionDictionaryForModels(){
try{
//exception is triggered at the following line!!!
EOModel lastModel =
(EOModel)EOModelGroup.defaultGroup().models().lastObject();
NSMutableDictionary modelConnDictionary =
lastModel.connectionDictionary().mutableClone();
if ((isSwitchDatabaseConnection()) && (modelConnDictionary!= null)){
modelConnDictionary =
this.parseSystemConnectionDictionary(modelConnDictionary);
}
if (modelConnDictionary != null)
this.setObjectForKey( (NSDictionary)modelConnDictionary,
CONNECTION_DICTIONARIES_KEY);
}
catch(Exception e){
e.printStackTrace();
}
}
As you see, there is no static method during the calling. The stop point is
at where the EOModelGroup makes the calls the the models().lastObject() as
you could see in my previous trace posted.
Cheers
Cheong Hee
----- Original Message -----
From: "David Avendasora" <email@hidden>
To: "Cheong Hee (Gmail)" <email@hidden>
Cc: "Paul Hoadley" <email@hidden>; "WebObjects Dev"
<email@hidden>
Sent: Thursday, September 15, 2011 1:47 PM
Subject: Re: Interface file not loaded (solved)
I have had classes fail to initialize due to problems with the actual logic
inside a static method or variable (hard to believe that _I'd_ abuse Java
so, but seriously, I've done it).
Look very closely to make sure that you aren't doing something that the
compiler thinks is fine (or at least doesn't know is bad) in a static method
or in assigning a static variable a value but won't actually work at
runtime.
Pasting code here would be helpful.
(and by helpful, I mean help me to not feel like the only one on the list
that does these kinds of things! :-)
Dave
PS. Paul, One man's pedant is another man's guru.
On Sep 15, 2011, at 11:00 AM, Cheong Hee (Gmail) wrote:
Hi Paul
Glad that you have pointed it out the very moment that i am about to raise
this again. This is strange - due to my weak undestanding
- and it works once after i did the change. But then it haunted me again
the next day, and after which the exception is back. i am unable to
rectify it now. Appreciate you raise it again and it is just in time : )
Cheers
Cheong Hee
----- Original Message ----- From: "Paul Hoadley" <email@hidden>
To: "Cheong Hee (Gmail)" <email@hidden>
Cc: "WebObjects Dev" <email@hidden>
Sent: Thursday, September 15, 2011 10:10 AM
Subject: Re: Interface file not loaded (solved)
Hi,
Just jumping in on the end of this thread...
On 13/09/2011, at 7:50 PM, Cheong Hee (Gmail) wrote:
Looks like you are right.. apparently, there is a string value defined as
"final static" instead of "static final".
I'm glad you got it working, but I suspect that observation is a red
herring. There are _suggestions_ about modifier order in the JLS, but
they're just that—suggestions. I mention this not (just) to be a pedant,
but because you might run into your problem again in the future, and I
don't think this can possibly be the solution.
--
Paul.
http://logicsquad.net/
_______________________________________________
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
_______________________________________________
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