These are not the droids you are looking for.

ERXEC installs the missing delegate.  So using that, you won’t get the message 
below.  But somewhere eo.editingContext() == null is still true.  You never saw 
that message before using EOEditingContext as eo.editingContext() was not null. 
 Perhaps some bad data somewhere?

Chuck


From: Markus Ruggiero <mailingli...@kataputt.com>
Date: Wednesday, June 21, 2017 at 7:34 AM
To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Cc: Chuck Hill <ch...@gevityinc.com>
Subject: Re: Strange error

Hi Chuck,

I just got more info from the customer and was able to reproduce this in my dev 
env. It was easy to fix but I have no idea why it did not work before. We did 
restructure the Resources/Properties and the customer claims that the issue did 
show up afterwards.

This fetch resulted in the error. Changed code to

EOEditingContext ec = new EOEditingContext();
NSArray<Category> cats = Category.fetchAllCategories(ec);

Changing to this....

EOEditingContext ec = DSMEditiingContext.newEditingContex();
NSArray<Category> cats = Category.fetchAllCategories(ec);

...and everything is fine. DSMEditingContext is our extension of ERXEC.

Why would the good old EOEditingContext result in such a crash?

Your assessment that the user might have backtracked and such seems not 
relevant here. I started the application (it's an old moden D2W thingy), 
selected the entity from the popup, and selected Query. This is a plain D2W 
page with one custom property level query component. This component shows a 
list of Categories and lets the user select one from a popup as query criteria. 
It was the accessor for the list binding that crashed. I did not even get as 
far as to use the selectec value for anything.

Anyway, things work now (as far I have tested, let's see, if the customer also 
has it working in production).

Thanks for your answer. I already thought that the mailing list was dead. It 
has become a bit lonesome here.

---markus---

On 21 Jun 2017, at 16:11, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Hi Markus,

The root cause was that the user did something (most likely, though a rare code 
bug is also a possibility) so that they were working with an EO that was not 
registered in an EC.  The messages below come from the code reporting this.

Mostly I have seen this happen by the user back-tracking in the browser.  Eg. 
Start a New operation, Cancel it (ec.revert()), then back track and enter data 
in the new EO and Save.  Or delete and then backtrack.  Other logic errors can 
result in this too.

Chuck

From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc....@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc....@lists.apple.com>>
 on behalf of Markus Ruggiero 
<mailingli...@kataputt.com<mailto:mailingli...@kataputt.com>>
Date: Wednesday, June 21, 2017 at 2:52 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Strange error

A customer just reported a problem in a functionality that has not been touched 
for at least 3 years.



Error:

java.lang.IllegalStateException: Found null delegate. You can disable this 
check by setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in 
your WebObjects.properties

Reason:

Found null delegate. You can disable this check by setting 
er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in your 
WebObjects.properties


Setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in the 
Properties File results in:

Error:

java.lang.IllegalStateException: Attempt to access an EO that has either not 
been inserted into any EOEditingContext or its EOEditingContext has already 
been disposed

Reason:

Attempt to access an EO that has either not been inserted into any 
EOEditingContext or its EOEditingContext has already been disposed



We are trying to reproduce this and get some more info about what the user has 
done and whether there is something in the log files. In the mean time I dare 
asking here :-)

Anyone got an idea what this could be?

Thanks
---markus---



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to