Yep! It was a concurrency issue in the utility. All I needed to do was add that PrintStackTrace to the catch block to point me in the right direction.
Thanks as always! Ken Anderson k...@watermarkstudios.com On Apr 12, 2012, at 10:46 AM, Chuck Hill wrote: > Keep following the trace, what is on > at com.digitalesdesign.pup.util.WorkerQueue.addTask(WorkerQueue.java:53) > > And what is calling that on >> at >> com.digitalesdesign.pup.dataobjects.Address.willUpdate(Address.java:160) > > > Chuck > > On 2012-04-12, at 10:43 AM, Ken Anderson wrote: > >> This is not my code. I'm still figuring it out myself, but the ec's all >> match up by id. I did the printstacktrace: >> >> java.lang.NullPointerException >> at com.digitalesdesign.pup.util.WorkerQueue.addTask(WorkerQueue.java:53) >> at >> com.digitalesdesign.pup.dataobjects.Address.willUpdate(Address.java:160) >> at >> er.extensions.eof.ERXEnterpriseObject$4.perform(ERXEnterpriseObject.java:196) >> at >> er.extensions.eof.ERXEnterpriseObject$Processor.perform(ERXEnterpriseObject.java:163) >> at >> er.extensions.eof.ERXEnterpriseObject$Observer.editingContextWillSaveChanges(ERXEnterpriseObject.java:74) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) >> at >> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588) >> at >> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532) >> at >> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546) >> at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1014) >> at >> com.digitalesdesign.pup.dataobjects.Address.geocodeAddress(Address.java:96) >> at >> com.digitalesdesign.pup.dataobjects.Address.provideGeocodeAddress(Address.java:122) >> at >> com.digitalesdesign.pup.Application.performAddressGeocodingTemp(Application.java:176) >> at com.digitalesdesign.pup.Application.<init>(Application.java:34) >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at >> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at java.lang.Class.newInstance0(Class.java:355) >> at java.lang.Class.newInstance(Class.java:308) >> at com.webobjects.appserver.WOApplication.main(WOApplication.java:547) >> at er.extensions.appserver.ERXApplication.main(ERXApplication.java:826) >> at com.digitalesdesign.pup.Application.main(Application.java:26) >> >> Ken Anderson >> k...@watermarkstudios.com >> >> >> >> On Apr 12, 2012, at 10:37 AM, Chuck Hill wrote: >> >>> >>> On 2012-04-12, at 10:25 AM, Ken Anderson wrote: >>> >>>> The editing context is passed in as a parameter and checked between lines >>>> 68-73. >>>> >>>> This is line 68-73: >>>> >>>> 68 Address me = this; >>>> 69 >>>> 70 if (editingContext() != editingContext) { >>>> 71 System.out.println("ec not matched"); >>>> 72 me = this.localInstanceIn(editingContext); >>> >>> That seems confusing. You are using editingContext, editingContext(), and >>> me.editingContext(). >>> >>> >>>> 73 } >>>> >>>> And this is line 94-101: >>>> >>>> 94 try{ >>>> 95 System.out.println(editingContext.toString()); >>>> 96 me.editingContext().saveChanges(); >>>> 97 } catch (Exception e){ >>>> 98 System.out.println(me._primaryKey); >>>> 99 >>>> System.out.println(editingContext.objectForGlobalID(me.__globalID()).valueForKey(ADDRESS1_KEY)); >>>> 100 System.out.println(e.getCause().toString()); >>> >>> So if the exception is happening on line 100, then e.getCause() is null, >>> no? Try e.printStackTrace(); >>> >>> >>> Chuck >>> >>>> 101 } >>>> >>>> Ken Anderson >>>> k...@watermarkstudios.com >>>> >>>> >>>> >>>> On Apr 12, 2012, at 10:14 AM, Chuck Hill wrote: >>>> >>>>> Which is line 100? My first guess is that editingContext != >>>>> me.editingContext() and further that me has been deleted or is otherwise >>>>> no longer in an valid editing context. >>>>> >>>>> >>>>> On 2012-04-12, at 10:05 AM, Ken Anderson wrote: >>>>> >>>>>> Okay...another issue from a revision project. If you need any other >>>>>> information to make the situation clearer, let me know. I keep getting a >>>>>> NullPointerException in the following code. Keep in mind that "me" is an >>>>>> Address object and this block of code is contained in a method that is >>>>>> triggered to give the exception. All of my System.out.println() efforts >>>>>> return positive results: >>>>>> >>>>>> "try{ >>>>>> System.out.println(editingContext.toString()); >>>>>> me.editingContext().saveChanges(); >>>>>> } catch (Exception e){ >>>>>> System.out.println(me._primaryKey); >>>>>> >>>>>> System.out.println(editingContext.objectForGlobalID(me.__globalID()).valueForKey(ADDRESS1_KEY)); >>>>>> System.out.println(e.getCause().toString()); >>>>>> } >>>>>> System.out.println("ec saved for: " + >>>>>> me.getAddressForMap(true));" >>>>>> >>>>>> Printout: >>>>>> >>>>>> "r.extensions.eof.ERXEC@7a4fe91e >>>>>> 1010660 >>>>>> 42 Rue Perron >>>>>> java.lang.NullPointerException >>>>>> >>>>>> at >>>>>> com.digitalesdesign.pup.dataobjects.Address.geocodeAddress(Address.java:100) >>>>>> >>>>>> at >>>>>> com.digitalesdesign.pup.dataobjects.Address.provideGeocodeAddress(Address.java:120) >>>>>> >>>>>> at >>>>>> com.digitalesdesign.pup.Application.performAddressGeocodingTemp(Application.java:176) >>>>>> >>>>>> at com.digitalesdesign.pup.Application.<init>(Application.java:34) >>>>>> >>>>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >>>>>> >>>>>> at >>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >>>>>> >>>>>> at >>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >>>>>> >>>>>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >>>>>> >>>>>> at java.lang.Class.newInstance0(Class.java:355) >>>>>> >>>>>> at java.lang.Class.newInstance(Class.java:308) >>>>>> >>>>>> at com.webobjects.appserver.WOApplication.main(WOApplication.java:547) >>>>>> >>>>>> at er.extensions.appserver.ERXApplication.main(ERXApplication.java:826) >>>>>> >>>>>> at com.digitalesdesign.pup.Application.main(Application.java:26)" >>>>>> >>>>>> >>>>>> Ken Anderson >>>>>> k...@watermarkstudios.com >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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/chill%40global-village.net >>>>>> >>>>>> This email sent to ch...@global-village.net >>>>> >>>>> -- >>>>> 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/gvc/practical_webobjects >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> -- >>> 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/gvc/practical_webobjects >>> >>> >>> >>> >>> >>> >>> >>> >> > > -- > 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/gvc/practical_webobjects > > > > > > > >
_______________________________________________ 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