Problem calling NSBundle.bundleForClass from junit test code
Hi all, I am running a junit test case. The code there wants to load a file that resides in the Resources folder from the framework bundle. That framework is where the class I am testing and the junit class reside. However, this returns null: NSBundle bundle = NSBundle.bundleForClass(MyClass.class): Any ideas? Thanks Ricardo Parada ___ 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
Re: just a test
Apparently we’re back up. > On Feb 4, 2017, at 6:13 PM, Theodore Petroskywrote: > > are we back up? or is this the end? > ___ > 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/mark.morris%40experian.com > > This email sent to mark.mor...@experian.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Test message please ignore
apparently not! > On Aug 14, 2016, at 10:30 AM, Theodore Petrosky <tedp...@yahoo.com> wrote: > > Is there a problem with the webobjects dev email system? > > Just a test > > Ted > ___ > 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/kenlists%40anderhome.com > > This email sent to kenli...@anderhome.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
Are you accessing JavaMonitor through Apache or with Direct Connect or a negative instance (port) number in the URL? If you are going through Apache to get to JavaMonitor then that is a reasonable assumption. If not, you have proven nothing until you get to the app through Apache. Also check the Apache error log, just in case. Chuck On 2016-04-12, 4:48 AM, "Paul Yu" <p...@mac.com> wrote: >Chuck > >If I have Apache 2.4 running and I can access it, and I can access JavaMonitor >and I can access WOTaskd, and when I tick ON in JavaMonitor I can tail -f >App-1 and see the app initializing then can I assume that mod_WebObjects is >working? > >The app is dying at Migration but that’s not what I’m testing right now… > >Paul > >> On Apr 7, 2016, at 2:24 PM, Chuck Hill <ch...@gevityinc.com> wrote: >> >> Assuming you can access the app, yes. >> >> >> >> >> On 2016-04-07, 11:24 AM, "Paul Yu" <p...@mac.com> wrote: >> >>> So if I’ve got it compiled and loaded into Apache 2.4 and apachectl -M >>> shows the module loaded then I should be fine? >>> >>> Paul >>> >>>> On Apr 7, 2016, at 2:22 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>>> >>>> Install it and use it to access the app. If it compiles, it is pretty >>>> much a binary test, either it crashes or it works fine. Try a file upload >>>> too. I don’t recall ever hearing of any “it mostly works except for this >>>> one edge case” bugs due to version updates. >>>> >>>> Chuck >>>> >>>> >>>> >>>> >>>> On 2016-04-07, 6:00 AM, "Paul Yu" <p...@mac.com> wrote: >>>> >>>>> Once I have the woadaptor built, how do I know that it is actually >>>>> working by itself? >>>>> >>>>> Paul >>>>> >>>>> Sent from my iPad >>>>> >>>>>> On Apr 6, 2016, at 5:43 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>>>>> >>>>>> Testing? Seriously? :-P If it does not crash, it is tested. >>>>>> >>>>>> Look in the archives for these threads: >>>>>> WebObjects and Apache 2.4 on El Capitan >>>>>> Apache Adaptor on debian:jessie >>>>>> >>>>>> That should get you started. >>>>>> >>>>>> Chuck >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> On 2016-04-06, 11:45 AM, >>>>>>> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf >>>>>>> of Paul Yu" <webobjects-dev-bounces+chill=gevityinc@lists.apple.com >>>>>>> on behalf of p...@mac.com> wrote: >>>>>>> >>>>>>> Hi List >>>>>>> >>>>>>> Is there a procedure for building and testing WOAdaptor? >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> ___ >>>>>>> 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%40gevityinc.com >>>>>>> >>>>>>> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
On 12/04/2016 12:48, "webobjects-dev-bounces+pmiddleton=onestep.co...@lists.apple.com on behalf of Paul Yu"wrote: >Chuck > >If I have Apache 2.4 running and I can access it, and I can access JavaMonitor >and I can access WOTaskd, and when I tick ON in JavaMonitor I can tail -f >App-1 and see the app initializing then can I assume that mod_WebObjects is >working? > >The app is dying at Migration but that’s not what I’m testing right now… > >Paul I suggest you would be better off using the techniques documented in the administrator's notes in the apache.conf file in the project for the adaptor you've built and installed; "Note: To enable logging, touch '/tmp/logWebObjects' as the administrator user (usually root)." and also the stuff about the WOAdaptorInfo page. The WOAdaptorInfo page is generally not helpful when it's getting its configuration by polling wotaskd and you don't have any apps running cleanly, but, being able to see it at all is a hint that mod_WebObjects is working. (mod_WebObjects is nothing to do with launching or managing application instances; it's about being able to connect to them indirectly via Apache.) One of my techniques for deployment is to get my app instances configured and running, use Monitor to get the XMLConfigDoc, save that to disk, then reconfigure the WOAdaptor to use that ('File Configuration') instead of polling wotaskd ('Host List Configuration'), because then access to my applications is not lost if/when wotaskd hangs. -- Patrick ___ 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
Re: WOAdaptor build and test
Chuck If I have Apache 2.4 running and I can access it, and I can access JavaMonitor and I can access WOTaskd, and when I tick ON in JavaMonitor I can tail -f App-1 and see the app initializing then can I assume that mod_WebObjects is working? The app is dying at Migration but that’s not what I’m testing right now… Paul > On Apr 7, 2016, at 2:24 PM, Chuck Hill <ch...@gevityinc.com> wrote: > > Assuming you can access the app, yes. > > > > > On 2016-04-07, 11:24 AM, "Paul Yu" <p...@mac.com> wrote: > >> So if I’ve got it compiled and loaded into Apache 2.4 and apachectl -M shows >> the module loaded then I should be fine? >> >> Paul >> >>> On Apr 7, 2016, at 2:22 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>> >>> Install it and use it to access the app. If it compiles, it is pretty much >>> a binary test, either it crashes or it works fine. Try a file upload too. >>> I don’t recall ever hearing of any “it mostly works except for this one >>> edge case” bugs due to version updates. >>> >>> Chuck >>> >>> >>> >>> >>> On 2016-04-07, 6:00 AM, "Paul Yu" <p...@mac.com> wrote: >>> >>>> Once I have the woadaptor built, how do I know that it is actually working >>>> by itself? >>>> >>>> Paul >>>> >>>> Sent from my iPad >>>> >>>>> On Apr 6, 2016, at 5:43 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>>>> >>>>> Testing? Seriously? :-P If it does not crash, it is tested. >>>>> >>>>> Look in the archives for these threads: >>>>> WebObjects and Apache 2.4 on El Capitan >>>>> Apache Adaptor on debian:jessie >>>>> >>>>> That should get you started. >>>>> >>>>> Chuck >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> On 2016-04-06, 11:45 AM, >>>>>> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of >>>>>> Paul Yu" <webobjects-dev-bounces+chill=gevityinc@lists.apple.com on >>>>>> behalf of p...@mac.com> wrote: >>>>>> >>>>>> Hi List >>>>>> >>>>>> Is there a procedure for building and testing WOAdaptor? >>>>>> >>>>>> Paul >>>>>> >>>>>> ___ >>>>>> 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%40gevityinc.com >>>>>> >>>>>> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
Assuming you can access the app, yes. On 2016-04-07, 11:24 AM, "Paul Yu" <p...@mac.com> wrote: >So if I’ve got it compiled and loaded into Apache 2.4 and apachectl -M shows >the module loaded then I should be fine? > >Paul > >> On Apr 7, 2016, at 2:22 PM, Chuck Hill <ch...@gevityinc.com> wrote: >> >> Install it and use it to access the app. If it compiles, it is pretty much >> a binary test, either it crashes or it works fine. Try a file upload too. >> I don’t recall ever hearing of any “it mostly works except for this one edge >> case” bugs due to version updates. >> >> Chuck >> >> >> >> >> On 2016-04-07, 6:00 AM, "Paul Yu" <p...@mac.com> wrote: >> >>> Once I have the woadaptor built, how do I know that it is actually working >>> by itself? >>> >>> Paul >>> >>> Sent from my iPad >>> >>>> On Apr 6, 2016, at 5:43 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>>> >>>> Testing? Seriously? :-P If it does not crash, it is tested. >>>> >>>> Look in the archives for these threads: >>>> WebObjects and Apache 2.4 on El Capitan >>>> Apache Adaptor on debian:jessie >>>> >>>> That should get you started. >>>> >>>> Chuck >>>> >>>> >>>> >>>> >>>> >>>>> On 2016-04-06, 11:45 AM, >>>>> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of >>>>> Paul Yu" <webobjects-dev-bounces+chill=gevityinc@lists.apple.com on >>>>> behalf of p...@mac.com> wrote: >>>>> >>>>> Hi List >>>>> >>>>> Is there a procedure for building and testing WOAdaptor? >>>>> >>>>> Paul >>>>> >>>>> ___ >>>>> 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%40gevityinc.com >>>>> >>>>> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
So if I’ve got it compiled and loaded into Apache 2.4 and apachectl -M shows the module loaded then I should be fine? Paul > On Apr 7, 2016, at 2:22 PM, Chuck Hill <ch...@gevityinc.com> wrote: > > Install it and use it to access the app. If it compiles, it is pretty much a > binary test, either it crashes or it works fine. Try a file upload too. I > don’t recall ever hearing of any “it mostly works except for this one edge > case” bugs due to version updates. > > Chuck > > > > > On 2016-04-07, 6:00 AM, "Paul Yu" <p...@mac.com> wrote: > >> Once I have the woadaptor built, how do I know that it is actually working >> by itself? >> >> Paul >> >> Sent from my iPad >> >>> On Apr 6, 2016, at 5:43 PM, Chuck Hill <ch...@gevityinc.com> wrote: >>> >>> Testing? Seriously? :-P If it does not crash, it is tested. >>> >>> Look in the archives for these threads: >>> WebObjects and Apache 2.4 on El Capitan >>> Apache Adaptor on debian:jessie >>> >>> That should get you started. >>> >>> Chuck >>> >>> >>> >>> >>> >>>> On 2016-04-06, 11:45 AM, >>>> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of >>>> Paul Yu" <webobjects-dev-bounces+chill=gevityinc@lists.apple.com on >>>> behalf of p...@mac.com> wrote: >>>> >>>> Hi List >>>> >>>> Is there a procedure for building and testing WOAdaptor? >>>> >>>> Paul >>>> >>>> ___ >>>> 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%40gevityinc.com >>>> >>>> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
Install it and use it to access the app. If it compiles, it is pretty much a binary test, either it crashes or it works fine. Try a file upload too. I don’t recall ever hearing of any “it mostly works except for this one edge case” bugs due to version updates. Chuck On 2016-04-07, 6:00 AM, "Paul Yu" <p...@mac.com> wrote: >Once I have the woadaptor built, how do I know that it is actually working by >itself? > >Paul > >Sent from my iPad > >> On Apr 6, 2016, at 5:43 PM, Chuck Hill <ch...@gevityinc.com> wrote: >> >> Testing? Seriously? :-P If it does not crash, it is tested. >> >> Look in the archives for these threads: >> WebObjects and Apache 2.4 on El Capitan >> Apache Adaptor on debian:jessie >> >> That should get you started. >> >> Chuck >> >> >> >> >> >>> On 2016-04-06, 11:45 AM, >>> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of >>> Paul Yu" <webobjects-dev-bounces+chill=gevityinc@lists.apple.com on >>> behalf of p...@mac.com> wrote: >>> >>> Hi List >>> >>> Is there a procedure for building and testing WOAdaptor? >>> >>> Paul >>> >>> ___ >>> 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%40gevityinc.com >>> >>> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
Once I have the woadaptor built, how do I know that it is actually working by itself? Paul Sent from my iPad > On Apr 6, 2016, at 5:43 PM, Chuck Hillwrote: > > Testing? Seriously? :-P If it does not crash, it is tested. > > Look in the archives for these threads: > WebObjects and Apache 2.4 on El Capitan > Apache Adaptor on debian:jessie > > That should get you started. > > Chuck > > > > > >> On 2016-04-06, 11:45 AM, >> "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of >> Paul Yu" > behalf of p...@mac.com> wrote: >> >> Hi List >> >> Is there a procedure for building and testing WOAdaptor? >> >> Paul >> >> ___ >> 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%40gevityinc.com >> >> This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOAdaptor build and test
Testing? Seriously? :-P If it does not crash, it is tested. Look in the archives for these threads: WebObjects and Apache 2.4 on El Capitan Apache Adaptor on debian:jessie That should get you started. Chuck On 2016-04-06, 11:45 AM, "webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of Paul Yu"wrote: >Hi List > >Is there a procedure for building and testing WOAdaptor? > >Paul > > ___ >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%40gevityinc.com > >This email sent to ch...@gevityinc.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WOAdaptor build and test
Hi List Is there a procedure for building and testing WOAdaptor? Paul ___ 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
FrontBase triggers howto (was: Never save objects which don't pass a test (was: searching for a weird deletion))
Hello there, after having played for a time with constraints, I have decided to use a trigger instead -- main reason is that I really want the validation performed on INSERT only; a constraint might get evaluated in other occassions, too. Nevertheless, I can't find a decent way of doing that in FrontBase. Is here anybody who knows its dialect well enough? Ideally, the trigger would look more or less like this: === create trigger TEST_PO_TRIGGER before insert on T_PRICE_OFFER referencing new po for each row when (... my complex validation condition ...) raise exception 'Price offer not valid' === presumed RAISE EXCEPTION worked in FrontBase, which it does not, nor I was able to find any other statement/function to rollback the transaction and report an error. Presumed there's no such function at all, the first fallback would be === create trigger TEST_PO_TRIGGER before insert on T_PRICE_OFFER referencing new po for each row when (... my complex validation condition ...) set po.C_UID = null === which would exploit the fact C_UID (which happens to be the PK) can't be null. Alas, again, whatever I tried, I haven't been able to find any SET syntax which would work :( Eventually, the only trigger I found working was === create trigger TEST_PO_TRIGGER after insert on T_PRICE_OFFER referencing new po for each row when (... my complex validation condition ...) update T_PRICE_OFFER set C_UID = null where C_UID=po.C_UID === but darn, that seems to be a _terribly_ convoluted work-around for the desired behaviour! As always, I'll be grateful for any advice, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
Chuck, On 20. 2. 2015, at 19:37, Chuck Hill ch...@gevityinc.com wrote: One way would be to twist the DB to do the complete restraint to me, something like to a pseudo-code “inserted_row.attr=MAX(SELECT attr FROM this_table WHERE another_attr.isValid) AND couple more similar conditions” -- frankly I am not sure whether the database (FrontBase) can do that at all, and if it can, definitely I don't know how to. I think you can do it as a Check constraint. It needs to be a boolean expression, but I am not sure it can include selects. A quick experiment would show if it can. It looks like FrontBase allows me to use SELECT in check constraints, but I've bumped into another problem -- I need also to join to access values from another table, and I don't know how to express „column from the row just being inserted, not from any other table in the SELECT“? My constraint expression (considerably simplified for readability) looks like this: (select max(po.C_PRICE) from T_PRICE_OFFER po, T_AUCTION auc where po.C_AUCTION_ID=auc.C_UID and po.C_PRICE=auc.C_MAX_PRICE and po.C_CREATION_DATEC_CREATION_DATE)C_PRICE to express a condition “PRICE of the inserted PRICE_OFFER must be higher than all PRICEs of all older PRICE_OFFERs belonging to the same auction, whose PRICE does not exceed the auction's MAX_PRICE”. The problem is with the “older PRICE_OFFERs” part (“WHERE ... po.C_CREATION_DATEC_CREATION_DATE”) -- FrontBase complains that C_CREATION_DATE is ambiguous. Well it is -- all the tables in question contain such a column -- but how should I prefix it to tell the server „this is the CREATION_DATE of the row which is being inserted“? Thanks a lot, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
Anyway, back to the original question -- On 20. 2. 2015, at 18:27, OC o...@ocs.cz wrote: Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. -- I have succeeded to consult with my client, and the option of „allowing to save any bid, determine whether it was valid or not in future“ is out. On the other hand, he again suggests pessimistic locking: „why don't we simply lock the auction row when user reads the data to determine whether his bid is valid, and unlock when he saves the valid bid or when he determines the bid is not valid“? I can see only one slight drawback -- unnecessary locks in case the bid validation fails -- but that should be a negligible problem, most bid attempts are valid (and _if_ they become invalid, then since other bid was entered shortly before, which would lead to optimistic exception anyway). Far as I understand though based on your === On 24. 1. 2015, at 0:12, Chuck Hill ch...@gevityinc.com wrote: I doubt that lockObject() code in EOF has been run in… maybe forever. It is highly possible that it is causing EOF to get confused and resulting in the errors below. Get rid of the lockObject() calls and see if the problem below goes away. === I guess the proper answer is „Well we can't use pessimistic row locking at all, since EOF does not support it reliably, and that's that.“ Is that right? Thanks again, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
I think it is a fair expectation that EOF may not properly support optimistic locking. I am not even sure how to set it up properly. There are some methods on EOEditingContext and EODatabaseContext, and one the EODatabaseContext Delegate. Chuck On 2015-02-21, 3:42 AM, OC wrote: Anyway, back to the original question -- On 20. 2. 2015, at 18:27, OC o...@ocs.czmailto:o...@ocs.cz wrote: Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. -- I have succeeded to consult with my client, and the option of „allowing to save any bid, determine whether it was valid or not in future“ is out. On the other hand, he again suggests pessimistic locking: „why don't we simply lock the auction row when user reads the data to determine whether his bid is valid, and unlock when he saves the valid bid or when he determines the bid is not valid“? I can see only one slight drawback -- unnecessary locks in case the bid validation fails -- but that should be a negligible problem, most bid attempts are valid (and _if_ they become invalid, then since other bid was entered shortly before, which would lead to optimistic exception anyway). Far as I understand though based on your === On 24. 1. 2015, at 0:12, Chuck Hill ch...@gevityinc.commailto:ch...@gevityinc.com wrote: I doubt that lockObject() code in EOF has been run in… maybe forever. It is highly possible that it is causing EOF to get confused and resulting in the errors below. Get rid of the lockObject() calls and see if the problem below goes away. === I guess the proper answer is „Well we can't use pessimistic row locking at all, since EOF does not support it reliably, and that's that.“ Is that right? Thanks again, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
I don’t know, I suggest asking on the FrontBase developers list. On 2015-02-21, 2:55 AM, OC wrote: Chuck, On 20. 2. 2015, at 19:37, Chuck Hill ch...@gevityinc.commailto:ch...@gevityinc.com wrote: One way would be to twist the DB to do the complete restraint to me, something like to a pseudo-code “inserted_row.attr=MAX(SELECT attr FROM this_table WHERE another_attr.isValid) AND couple more similar conditions” -- frankly I am not sure whether the database (FrontBase) can do that at all, and if it can, definitely I don't know how to. I think you can do it as a Check constraint. It needs to be a boolean expression, but I am not sure it can include selects. A quick experiment would show if it can. It looks like FrontBase allows me to use SELECT in check constraints, but I've bumped into another problem -- I need also to join to access values from another table, and I don't know how to express „column from the row just being inserted, not from any other table in the SELECT“? My constraint expression (considerably simplified for readability) looks like this: (select max(po.C_PRICE) from T_PRICE_OFFER po, T_AUCTION auc where po.C_AUCTION_ID=auc.C_UID and po.C_PRICE=auc.C_MAX_PRICE and po.C_CREATION_DATEC_CREATION_DATE)C_PRICE to express a condition “PRICE of the inserted PRICE_OFFER must be higher than all PRICEs of all older PRICE_OFFERs belonging to the same auction, whose PRICE does not exceed the auction's MAX_PRICE”. The problem is with the “older PRICE_OFFERs” part (“WHERE ... po.C_CREATION_DATEC_CREATION_DATE”) -- FrontBase complains that C_CREATION_DATE is ambiguous. Well it is -- all the tables in question contain such a column -- but how should I prefix it to tell the server „this is the CREATION_DATE of the row which is being inserted“? Thanks a lot, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
Chuck, On 21. 2. 2015, at 20:09, Chuck Hill ch...@gevityinc.com wrote: I think it is a fair expectation that EOF may not properly support optimistic pessimistic, I guess? locking. I am not even sure how to set it up properly. There are some methods on EOEditingContext and EODatabaseContext, and one the EODatabaseContext Delegate. Thanks! One closely related question -- I suppose there is no way to explicitly set up the isolation level and locking discipline for a particular transaction (differently from the default of the JDBC connexion URL)? Or is there one? Thanks again and all the best, OC On 2015-02-21, 3:42 AM, OC wrote: Anyway, back to the original question -- On 20. 2. 2015, at 18:27, OC o...@ocs.cz wrote: Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. -- I have succeeded to consult with my client, and the option of „allowing to save any bid, determine whether it was valid or not in future“ is out. On the other hand, he again suggests pessimistic locking: „why don't we simply lock the auction row when user reads the data to determine whether his bid is valid, and unlock when he saves the valid bid or when he determines the bid is not valid“? I can see only one slight drawback -- unnecessary locks in case the bid validation fails -- but that should be a negligible problem, most bid attempts are valid (and _if_ they become invalid, then since other bid was entered shortly before, which would lead to optimistic exception anyway). Far as I understand though based on your === On 24. 1. 2015, at 0:12, Chuck Hill ch...@gevityinc.com wrote: I doubt that lockObject() code in EOF has been run in… maybe forever. It is highly possible that it is causing EOF to get confused and resulting in the errors below. Get rid of the lockObject() calls and see if the problem below goes away. === I guess the proper answer is „Well we can't use pessimistic row locking at all, since EOF does not support it reliably, and that's that.“ Is that right? Thanks again, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
On 2015-02-21, 11:17 AM, OC wrote: Chuck, On 21. 2. 2015, at 20:09, Chuck Hill ch...@gevityinc.commailto:ch...@gevityinc.com wrote: I think it is a fair expectation that EOF may not properly support optimistic pessimistic, I guess? Cough. Yes. locking. I am not even sure how to set it up properly. There are some methods on EOEditingContext and EODatabaseContext, and one the EODatabaseContext Delegate. Thanks! One closely related question -- I suppose there is no way to explicitly set up the isolation level and locking discipline for a particular transaction (differently from the default of the JDBC connexion URL)? Or is there one? You could set up a second EOF stack and set the JDBC url isolation level and locking discipline to what you want and use that stack for these transactions. Chuck Thanks again and all the best, OC On 2015-02-21, 3:42 AM, OC wrote: Anyway, back to the original question -- On 20. 2. 2015, at 18:27, OC o...@ocs.czmailto:o...@ocs.cz wrote: Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. -- I have succeeded to consult with my client, and the option of „allowing to save any bid, determine whether it was valid or not in future“ is out. On the other hand, he again suggests pessimistic locking: „why don't we simply lock the auction row when user reads the data to determine whether his bid is valid, and unlock when he saves the valid bid or when he determines the bid is not valid“? I can see only one slight drawback -- unnecessary locks in case the bid validation fails -- but that should be a negligible problem, most bid attempts are valid (and _if_ they become invalid, then since other bid was entered shortly before, which would lead to optimistic exception anyway). Far as I understand though based on your === On 24. 1. 2015, at 0:12, Chuck Hill ch...@gevityinc.commailto:ch...@gevityinc.com wrote: I doubt that lockObject() code in EOF has been run in… maybe forever. It is highly possible that it is causing EOF to get confused and resulting in the errors below. Get rid of the lockObject() calls and see if the problem below goes away. === I guess the proper answer is „Well we can't use pessimistic row locking at all, since EOF does not support it reliably, and that's that.“ Is that right? Thanks again, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
On Feb 20, 2015, at 12:09 PM, OC o...@ocs.cz wrote: it must pass a slightly more complex test than uniqueness: - when inserted into PRICE_OFFERS table, - the newly inserted object must have value in column PRICE, which is higher, - than any (max) of the already existing objects in that table, which - have YES in a boolean column VALID, and - at the same moment, have same value in AUCTION_ID column as the inserted object. (In fact the real condition is even more complex, but this is the gist of it: consider an auction system, where a new bid added to a particular auction must be higher than all previous valid bids for the same auction.) Nevertheless, I believe that when we are pursuing the implement-the-behaviour-at-the-application-level way (unlike the check restraint at the DB level), the particular TEST is actually irrelevant. The gist is that it must not be possible to store an object which does not pass TEST -- whatever the TEST tests. Why is this a requirement? If highest price wins, then you only need to select the max price row where price offer date is less than auction end. If a few offers get thrown in there out of order, how does that break anything? See please again the [1] above -- the code must make sure that (a) when TESTing, the participating objects are a proper snapshot of database contents of some moment in the past (b) when saving, the code must make sure that if the values of the snapshot did change, the saving won't happen That should be sufficient, should it not? Does it make sense? Thanks a lot, OC ___ 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
Never save objects which don't pass a test (was: searching for a weird deletion)
Chuck, Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST Alas, since the TEST is (slightly) more complex than A!=B, I can't use a UNIQUE db restraint. One way would be to twist the DB to do the complete restraint to me, something like to a pseudo-code “inserted_row.attr=MAX(SELECT attr FROM this_table WHERE another_attr.isValid) AND couple more similar conditions” -- frankly I am not sure whether the database (FrontBase) can do that at all, and if it can, definitely I don't know how to. Nevertheless this is an interesting idea which I am going to pursue (if anybody happens to know the solution, either how to, or that it is not possible at all, of course I'll be grateful for an advice, before I dive into that). Another way, the one I've tried to exploit so far, was implement the behaviour app-side: I believe that is the only way to absolutely ensure this. I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. So far, I thought this very simple concept should be rock-solid, but probably I am overlooking something of importance, as so often: === eo's entity locks on the someRelationship FK (among others) === OSC.lock() // possibly superfluous; simplifies situation by serializing intra-instance try { ec.unlock(); ec.lock() //* to make sure we get changes from other ECs now, by your excellent advice def rel=eo.someRelationship() // in DB there might be a newer value (saved meantime by another instance)... def attr=rel.someAttribute() // ... but it is not possible that in DB is an _older_ value than this if (TEST(attr,newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.setSomeAttribute(newAttributeValue) // once set, I NEVER change this value eo.addObjectToBothSidesOfRelationshipWithKey(new,'someRelationship') eo.editingContext().saveChanges() // catching optimistic exceptions and repeating the process if they happen } } finally { OSC.unlock() } === My reasoning is that - intra-instance, consistency is ensured by locked (single) OSC and by //* -- I am sure that I see the latest eo.someRelationship and its rel.someAttribute before saving, and thus the TEST is reliable; my own instance, even with concurrent requests, can't do anything wrong - inter-instance, the optimistic locking based on someRelationship FK should prevent saving in case any other instance succeeded to save its own new attribute meantime. What am I overlooking, how can this pattern fail? In fact, to decrease the probability of the optimistic locking exception, I force re-fetch (in my new multi-instance code, not the single-instance old one), like this: === OSC.lock() // precisely same as above try { ERXEC tempec=ERXEC.newEditingContext() tempec.fetchTimestamp=System.currentTimeMillis() // due to this, I don't need ec.unlock(); ec.lock(), for... def tempeo=eo.localInstanceIn(tempec) def rel=tempeo.someRelationship() // ... whatever was cached in ECs, current FK from eo's table gets fetched now def attr=rel.someAttribute() // ... just like its attribute from rel target's table if (TEST(attr,newAttributeValue)) { // precisely same as above (the only difference is that the values are newer... def new=EOUtilities.createAndInsertInstance(tempec,'SomeRelationshipTarget') new.setSomeAttribute(newAttributeValue) tempeo.addObjectToBothSidesOfRelationshipWithKey(new,'someRelationship') tempec.saveChanges() // ... and thus the probability of optimistic locking exception (caused by different relationship FK) is smaller (though of course not zero) } } finally { OSC.unlock() } === Are even these patters unsafe? Why? Thanks a big lot, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
On 2015-02-20, 12:30 PM, Ramsey Gurley wrote: On Feb 20, 2015, at 12:09 PM, OC o...@ocs.czmailto:o...@ocs.cz wrote: it must pass a slightly more complex test than uniqueness: - when inserted into PRICE_OFFERS table, - the newly inserted object must have value in column PRICE, which is higher, - than any (max) of the already existing objects in that table, which - have YES in a boolean column VALID, and - at the same moment, have same value in AUCTION_ID column as the inserted object. (In fact the real condition is even more complex, but this is the gist of it: consider an auction system, where a new bid added to a particular auction must be higher than all previous valid bids for the same auction.) Nevertheless, I believe that when we are pursuing the implement-the-behaviour-at-the-application-level way (unlike the check restraint at the DB level), the particular TEST is actually irrelevant. The gist is that it must not be possible to store an object which does not pass TEST -- whatever the TEST tests. Why is this a requirement? If highest price wins, then you only need to select the max price row where price offer date is less than auction end. If a few offers get thrown in there out of order, how does that break anything? That seems to make sense. You can save the bid, whatever it is, then immediately fetch any higher bid. If there was one, show the user an you were just outbid message. Chuck See please again the [1] above -- the code must make sure that (a) when TESTing, the participating objects are a proper snapshot of database contents of some moment in the past (b) when saving, the code must make sure that if the values of the snapshot did change, the saving won't happen That should be sufficient, should it not? Does it make sense? Thanks a lot, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
On 2015-02-20, 9:27 AM, OC wrote: Chuck, Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST Alas, since the TEST is (slightly) more complex than A!=B, I can't use a UNIQUE db restraint. One way would be to twist the DB to do the complete restraint to me, something like to a pseudo-code inserted_row.attr=MAX(SELECT attr FROM this_table WHERE another_attr.isValid) AND couple more similar conditions -- frankly I am not sure whether the database (FrontBase) can do that at all, and if it can, definitely I don't know how to. I think you can do it as a Check constraint. It needs to be a boolean expression, but I am not sure it can include selects. A quick experiment would show if it can. Nevertheless this is an interesting idea which I am going to pursue (if anybody happens to know the solution, either how to, or that it is not possible at all, of course I'll be grateful for an advice, before I dive into that). Another way, the one I've tried to exploit so far, was implement the behaviour app-side: I believe that is the only way to absolutely ensure this. I don't think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. So far, I thought this very simple concept should be rock-solid, but probably I am overlooking something of importance, as so often: === eo's entity locks on the someRelationship FK (among others) === OSC.lock() // possibly superfluous; simplifies situation by serializing intra-instance try { ec.unlock(); ec.lock() //* to make sure we get changes from other ECs now, by your excellent advice def rel=eo.someRelationship() // in DB there might be a newer value (saved meantime by another instance)... def attr=rel.someAttribute() // ... but it is not possible that in DB is an _older_ value than this if (TEST(attr,newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.setSomeAttribute(newAttributeValue) // once set, I NEVER change this value eo.addObjectToBothSidesOfRelationshipWithKey(new,'someRelationship') eo.editingContext().saveChanges() // catching optimistic exceptions and repeating the process if they happen } } finally { OSC.unlock() } === My reasoning is that - intra-instance, consistency is ensured by locked (single) OSC and by //* -- I am sure that I see the latest eo.someRelationship and its rel.someAttribute before saving, and thus the TEST is reliable; my own instance, even with concurrent requests, can't do anything wrong - inter-instance, the optimistic locking based on someRelationship FK should prevent saving in case any other instance succeeded to save its own new attribute meantime. What am I overlooking, how can this pattern fail? I am not quite following the requirements. Is it unique only for this object or for all objects? Chuck In fact, to decrease the probability of the optimistic locking exception, I force re-fetch (in my new multi-instance code, not the single-instance old one), like this: === OSC.lock() // precisely same as above try { ERXEC tempec=ERXEC.newEditingContext() tempec.fetchTimestamp=System.currentTimeMillis() // due to this, I don't need ec.unlock(); ec.lock(), for... def tempeo=eo.localInstanceIn(tempec) def rel=tempeo.someRelationship() // ... whatever was cached in ECs, current FK from eo's table gets fetched now def attr=rel.someAttribute() // ... just like its attribute from rel target's table if (TEST(attr,newAttributeValue)) { // precisely same as above (the only difference is that the values are newer... def new=EOUtilities.createAndInsertInstance(tempec,'SomeRelationshipTarget') new.setSomeAttribute(newAttributeValue) tempeo.addObjectToBothSidesOfRelationshipWithKey(new,'someRelationship') tempec.saveChanges() // ... and thus the probability of optimistic locking exception (caused by different relationship FK) is smaller (though of course not zero) } } finally { OSC.unlock() } === Are even these patters unsafe? Why? Thanks a big lot, OC ___ 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
Re: Never save objects which don't pass a test (was: searching for a weird deletion)
Chuck, On 20. 2. 2015, at 19:37, Chuck Hill ch...@gevityinc.com wrote: Actually _this_ should not be weird, this should be quite a normal code; the only requirement is that check-and-save, i.e., conceptually, === [1] if (TEST(eo.someRelationship().someAttribute(),newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.someAttribute=newAttributeValue eo.editingContext().saveChanges() } === so that I can be absolutely sure that nobody stores an attribute value which -- at the moment of COMMITTing the appropriate INSERT -- would not pass the TEST ... I believe that is the only way to absolutely ensure this. I don’t think you can make a rock-solid guarantee from the app code level. Can't I? That's bad. So far, I thought this very simple concept should be rock-solid, but probably I am overlooking something of importance, as so often: === eo's entity locks on the someRelationship FK (among others) === OSC.lock() // possibly superfluous; simplifies situation by serializing intra-instance try { ec.unlock(); ec.lock() //* to make sure we get changes from other ECs now, by your excellent advice def rel=eo.someRelationship() // in DB there might be a newer value (saved meantime by another instance)... def attr=rel.someAttribute() // ... but it is not possible that in DB is an _older_ value than this if (TEST(attr,newAttributeValue)) { def new=EOUtilities.createAndInsertInstance(eo.editingContext(),'SomeRelationshipTarget') new.setSomeAttribute(newAttributeValue) // once set, I NEVER change this value eo.addObjectToBothSidesOfRelationshipWithKey(new,'someRelationship') eo.editingContext().saveChanges() // catching optimistic exceptions and repeating the process if they happen } } finally { OSC.unlock() } === My reasoning is that - intra-instance, consistency is ensured by locked (single) OSC and by //* -- I am sure that I see the latest eo.someRelationship and its rel.someAttribute before saving, and thus the TEST is reliable; my own instance, even with concurrent requests, can't do anything wrong - inter-instance, the optimistic locking based on someRelationship FK should prevent saving in case any other instance succeeded to save its own new attribute meantime. What am I overlooking, how can this pattern fail? I am not quite following the requirements. Is it unique only for this object or for all objects? Sorry I have mislead you by using the term “UNIQUE“. It does not have to be unique; it must pass a slightly more complex test than uniqueness: - when inserted into PRICE_OFFERS table, - the newly inserted object must have value in column PRICE, which is higher, - than any (max) of the already existing objects in that table, which - have YES in a boolean column VALID, and - at the same moment, have same value in AUCTION_ID column as the inserted object. (In fact the real condition is even more complex, but this is the gist of it: consider an auction system, where a new bid added to a particular auction must be higher than all previous valid bids for the same auction.) Nevertheless, I believe that when we are pursuing the implement-the-behaviour-at-the-application-level way (unlike the check restraint at the DB level), the particular TEST is actually irrelevant. The gist is that it must not be possible to store an object which does not pass TEST -- whatever the TEST tests. See please again the [1] above -- the code must make sure that (a) when TESTing, the participating objects are a proper snapshot of database contents of some moment in the past (b) when saving, the code must make sure that if the values of the snapshot did change, the saving won't happen That should be sufficient, should it not? Does it make sense? Thanks a lot, OC ___ 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
Mailing List Test
Greetings, Just a test. -Phil ___ 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
Re: Mailing List Test
Greetings Everyone, Seems like I haven't successfully registered on this list since I haven't received my mail below. How do I register? -Phil On 2/28/2014 2:05 AM, Phil Wright wrote: Greetings, Just a test. -Phil ___ 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
Re: Mailing List Test
Phil, I’m not sure you ever get your own messages. I see your messages just fine. AARON ROSENZWEIG / Chat 'n Bike e: aa...@chatnbike.com t: (301) 956-2319 On Feb 27, 2014, at 1:18 PM, Phil Wright philipxwri...@gmail.com wrote: Greetings Everyone, Seems like I haven't successfully registered on this list since I haven't received my mail below. How do I register? -Phil On 2/28/2014 2:05 AM, Phil Wright wrote: Greetings, Just a test. -Phil ___ 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/aaron%40chatnbike.com This email sent to aa...@chatnbike.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Test multi-process sync in dev?
All, I have an app that I want to use groups sync to keep multiple instances up to date. I have it running, but haven't come up with a great way to test. Is there an easier way than doing a typical production setup? using wotaskd ? Right now, I test with apache, but with a URL that has -portnum on the end of it. This obviously won't allow me to balance between the two instances automatically. I'm only using direct actions to connect, so I *could* rotate the URL I connect to for each transaction, but I'd love to have it work in a more straightforward manner. Any thoughts? Thanks, Ken ___ 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
Re: Test multi-process sync in dev?
Deploy through Apache on your laptop or test server. Then use something like JMeter to simulate load that is editing the EOs. Chuck On 2013-10-09 12:06 PM, Ken Anderson kenli...@anderhome.com wrote: All, I have an app that I want to use groups sync to keep multiple instances up to date. I have it running, but haven't come up with a great way to test. Is there an easier way than doing a typical production setup? using wotaskd ? Right now, I test with apache, but with a URL that has -portnum on the end of it. This obviously won't allow me to balance between the two instances automatically. I'm only using direct actions to connect, so I *could* rotate the URL I connect to for each transaction, but I'd love to have it work in a more straightforward manner. Any thoughts? Thanks, Ken ___ 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-vill age.net This email sent to ch...@global-village.net ___ 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
Test that fail randomly with wounit
Hi, I have a test that succeed sometime and fail other times. If I run the jUnit source that contain this test, it fail sometime in the loadPermission() method. I have no idea where to look at. It is even more strange that sometime, I can have 6 successful tests and after 4 failed in a row. These test are inside a framework project. When I run the tests, I have these lines on the console but they do not seems to cause problem with the about 100 others tests in the project. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The model 'KAAccessControl' (path: file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld) cannot be added to model group EOModelGroup ((KAAccessControl, file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld), (erprototypes, file:/Users/sam/work/WonderSource/Frameworks/Core/ERPrototypes/Resources/erprototypes.eomodeld)) because it already contains a model with that name. Any idea? Samuel RolesFileLoader load a plist file to create and update objects in the database. Here is a my test source with a single test: @Rule public MockEditingContext ec = new MockEditingContext(); @Before public void loadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } @Test public void testReloadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } The error stack: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException … Caused by: java.lang.reflect.InvocationTargetException 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 com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) ... 32 more Caused by: java.lang.NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:290) at com.webobjects.eoaccess.EOAttribute.init(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties(EOEntity.java:1098) at com.webobjects.eoaccess.EOEntity._propertyDictionaryInitializer(EOEntity.java:3321) at com.webobjects.eoaccess.EOEntity._newDictionaryForProperties(EOEntity.java:3667) at com.webobjects.eoaccess.EOEntityClassDescription._newDictionaryForProperties(EOEntityClassDescription.java:88) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:111) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:100) at com.webobjects.eocontrol.EOGenericRecord.init(EOGenericRecord.java:73) at er.extensions.eof.ERXGenericRecord.init(ERXGenericRecord.java:106) at com.kaviju.accesscontrol.model.base._KAAccessList.init(_KAAccessList.java:15) at com.kaviju.accesscontrol.model.KAAccessList.init(KAAccessList.java:8) ... 37 more ___ 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
Re: Test that fail randomly with wounit
Hi Samuel, JUnit can/will run tests in a different order each time. So if your tests depend on something else having happened (EOF getting fully initialized, some other test running first) you will see random failures like this. I think it an/will run tests in multiple threads too (I use both JUnit and TestNG and sometimes mix up their features :-) so concurrency can also cause problems like this. On 2013-06-18, at 2:13 PM, Samuel Pelletier wrote: Hi, I have a test that succeed sometime and fail other times. If I run the jUnit source that contain this test, it fail sometime in the loadPermission() method. I have no idea where to look at. It is even more strange that sometime, I can have 6 successful tests and after 4 failed in a row. These test are inside a framework project. When I run the tests, I have these lines on the console but they do not seems to cause problem with the about 100 others tests in the project. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'erprototypes' has an empty connection dictionary. Those are likely to be OK. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. I am guessing you need that model for the permissions testing. This is likely a problem. - The model 'KAAccessControl' (path: file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld) cannot be added to model group EOModelGroup ((KAAccessControl, file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld), (erprototypes, file:/Users/sam/work/WonderSource/Frameworks/Core/ERPrototypes/Resources/erprototypes.eomodeld)) because it already contains a model with that name. Any idea? Do you have multiple EOF stacks (multiple EOObjectStoreCoordinators)? You could be using default* methods that only work with the default stack. Is there a stack trace for that last one to show where duplication model loading is having? Samuel RolesFileLoader load a plist file to create and update objects in the database. Here is a my test source with a single test: @Rule public MockEditingContext ec = new MockEditingContext(); @Before public void loadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } @Test public void testReloadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } The error stack: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException … Caused by: java.lang.reflect.InvocationTargetException 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 com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) ... 32 more Caused by: java.lang.NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) I think that means a model is being used that is not yet in an EOModelGroup. Chuck at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:290) at com.webobjects.eoaccess.EOAttribute.init(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties(EOEntity.java:1098) at com.webobjects.eoaccess.EOEntity._propertyDictionaryInitializer(EOEntity.java:3321) at com.webobjects.eoaccess.EOEntity._newDictionaryForProperties(EOEntity.java:3667) at com.webobjects.eoaccess.EOEntityClassDescription._newDictionaryForProperties(EOEntityClassDescription.java:88) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:111) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:100) at com.webobjects.eocontrol.EOGenericRecord.init(EOGenericRecord.java:73) at er.extensions.eof.ERXGenericRecord.init(ERXGenericRecord.java:106) at com.kaviju.accesscontrol.model.base._KAAccessList.init(_KAAccessList.java:15) at com.kaviju.accesscontrol.model.KAAccessList.init(KAAccessList.java:8
Re: Test that fail randomly with wounit
Hi Chuck, Hi Samuel, JUnit can/will run tests in a different order each time. So if your tests depend on something else having happened (EOF getting fully initialized, some other test running first) you will see random failures like this. I think it an/will run tests in multiple threads too (I use both JUnit and TestNG and sometimes mix up their features :-) so concurrency can also cause problems like this. I was wondering a multiple test side effect and build a single test class to verify and the situation is still there (I put the complete class except import and static final declarations in my previous message). I suspect some concurrency problem but where is the concurrency with a single test running? Even the debugger see only one thread. I have a test that succeed sometime and fail other times. If I run the jUnit source that contain this test, it fail sometime in the loadPermission() method. I have no idea where to look at. It is even more strange that sometime, I can have 6 successful tests and after 4 failed in a row. These test are inside a framework project. When I run the tests, I have these lines on the console but they do not seems to cause problem with the about 100 others tests in the project. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'erprototypes' has an empty connection dictionary. Those are likely to be OK. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. I am guessing you need that model for the permissions testing. This is likely a problem. - The model 'KAAccessControl' (path: file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld) cannot be added to model group EOModelGroup ((KAAccessControl, file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld), (erprototypes, file:/Users/sam/work/WonderSource/Frameworks/Core/ERPrototypes/Resources/erprototypes.eomodeld)) because it already contains a model with that name. Any idea? Do you have multiple EOF stacks (multiple EOObjectStoreCoordinators)? You could be using default* methods that only work with the default stack. Is there a stack trace for that last one to show where duplication model loading is having? I added dummy connection information in the model and the 2 empty connection dictionary warning for KAAccessControl disappeared but not the … already contains a model with that name. warning. Those are printed during the MockEditingContext creation. I have no idea that explain why the warning are duplicated. I do not use multiple EOF stack and anyway in the context of running the test, everything is from the sole MockEditingContext defined in the test class. The NPE is raised on the first EOUtilities.createAndInsertInstance() call sometime. Samuel Samuel RolesFileLoader load a plist file to create and update objects in the database. Here is a my test source with a single test: @Rule public MockEditingContext ec = new MockEditingContext(); @Before public void loadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } @Test public void testReloadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } The error stack: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException … Caused by: java.lang.reflect.InvocationTargetException 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 com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) ... 32 more Caused by: java.lang.NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) I think that means a model is being used that is not yet in an EOModelGroup. Chuck at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:290) at com.webobjects.eoaccess.EOAttribute.init(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties
Re: Test that fail randomly with wounit
Hi Chuck, I think your last comment was correct: I think that means a model is being used that is not yet in an EOModelGroup. I added the model name to the new MockEditingContext() call and no more fail to date when I run only this test class. If I run the complete project tests, I still have intermittent fail at the same place even after adding the model name to all the MockEditingContext constructors. I hate intermittent problems! Maybe Henrique Prange understand the situation. If the model name is mandatory to ensure it's loading before the test run, I suggest to enforce at least one name in the constructor of the MockEditingContext. Samuel Le 2013-06-18 à 18:10, Chuck Hill ch...@global-village.net a écrit : Hi Samuel, JUnit can/will run tests in a different order each time. So if your tests depend on something else having happened (EOF getting fully initialized, some other test running first) you will see random failures like this. I think it an/will run tests in multiple threads too (I use both JUnit and TestNG and sometimes mix up their features :-) so concurrency can also cause problems like this. On 2013-06-18, at 2:13 PM, Samuel Pelletier wrote: Hi, I have a test that succeed sometime and fail other times. If I run the jUnit source that contain this test, it fail sometime in the loadPermission() method. I have no idea where to look at. It is even more strange that sometime, I can have 6 successful tests and after 4 failed in a row. These test are inside a framework project. When I run the tests, I have these lines on the console but they do not seems to cause problem with the about 100 others tests in the project. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'erprototypes' has an empty connection dictionary. Those are likely to be OK. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. I am guessing you need that model for the permissions testing. This is likely a problem. - The model 'KAAccessControl' (path: file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld) cannot be added to model group EOModelGroup ((KAAccessControl, file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld), (erprototypes, file:/Users/sam/work/WonderSource/Frameworks/Core/ERPrototypes/Resources/erprototypes.eomodeld)) because it already contains a model with that name. Any idea? Do you have multiple EOF stacks (multiple EOObjectStoreCoordinators)? You could be using default* methods that only work with the default stack. Is there a stack trace for that last one to show where duplication model loading is having? Samuel RolesFileLoader load a plist file to create and update objects in the database. Here is a my test source with a single test: @Rule public MockEditingContext ec = new MockEditingContext(); @Before public void loadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } @Test public void testReloadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } The error stack: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException … Caused by: java.lang.reflect.InvocationTargetException 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 com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) ... 32 more Caused by: java.lang.NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) I think that means a model is being used that is not yet in an EOModelGroup. Chuck at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:290) at com.webobjects.eoaccess.EOAttribute.init(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties(EOEntity.java:1098) at com.webobjects.eoaccess.EOEntity._propertyDictionaryInitializer(EOEntity.java:3321
Re: Test that fail randomly with wounit
Le 2013-06-18 à 20:41, Samuel Pelletier sam...@samkar.com a écrit : Hi Chuck, I think your last comment was correct: I think that means a model is being used that is not yet in an EOModelGroup. I added the model name to the new MockEditingContext() call and no more fail to date when I run only this test class. If I run the complete project tests, I still have intermittent fail at the same place even after adding the model name to all the MockEditingContext constructors. I hate intermittent problems! Maybe Henrique Prange understand the situation. If the model name is mandatory to ensure it's loading before the test run, I suggest to enforce at least one name in the constructor of the MockEditingContext. And lucky you, he will be at WOWODC :-) Samuel Le 2013-06-18 à 18:10, Chuck Hill ch...@global-village.net a écrit : Hi Samuel, JUnit can/will run tests in a different order each time. So if your tests depend on something else having happened (EOF getting fully initialized, some other test running first) you will see random failures like this. I think it an/will run tests in multiple threads too (I use both JUnit and TestNG and sometimes mix up their features :-) so concurrency can also cause problems like this. On 2013-06-18, at 2:13 PM, Samuel Pelletier wrote: Hi, I have a test that succeed sometime and fail other times. If I run the jUnit source that contain this test, it fail sometime in the loadPermission() method. I have no idea where to look at. It is even more strange that sometime, I can have 6 successful tests and after 4 failed in a row. These test are inside a framework project. When I run the tests, I have these lines on the console but they do not seems to cause problem with the about 100 others tests in the project. - The EOModel 'erprototypes' has an empty connection dictionary. - The EOModel 'erprototypes' has an empty connection dictionary. Those are likely to be OK. - The EOModel 'KAAccessControl' has an empty connection dictionary. - The EOModel 'KAAccessControl' has an empty connection dictionary. I am guessing you need that model for the permissions testing. This is likely a problem. - The model 'KAAccessControl' (path: file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld) cannot be added to model group EOModelGroup ((KAAccessControl, file:/Users/sam/work/KavijuWO/KAAccessControl/Resources/KAAccessControl.eomodeld), (erprototypes, file:/Users/sam/work/WonderSource/Frameworks/Core/ERPrototypes/Resources/erprototypes.eomodeld)) because it already contains a model with that name. Any idea? Do you have multiple EOF stacks (multiple EOObjectStoreCoordinators)? You could be using default* methods that only work with the default stack. Is there a stack trace for that last one to show where duplication model loading is having? Samuel RolesFileLoader load a plist file to create and update objects in the database. Here is a my test source with a single test: @Rule public MockEditingContext ec = new MockEditingContext(); @Before public void loadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } @Test public void testReloadPermissions() { ERXProperties.setStringForKey(SampleRolesFile, RolesFileLoader.rolesFileNamePropertyKey); RolesFileLoader.loadRolesFile(ec); } The error stack: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException … Caused by: java.lang.reflect.InvocationTargetException 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 com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) ... 32 more Caused by: java.lang.NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) I think that means a model is being used that is not yet in an EOModelGroup. Chuck at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:290) at com.webobjects.eoaccess.EOAttribute.init(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties(EOEntity.java:1098
Re: anyone want to test an update to golipse?
be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.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/lists%40thetimmy.com This email sent to li...@thetimmy.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.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/lists%40thetimmy.com This email sent to li...@thetimmy.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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.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/lists%40thetimmy.com This email sent to li...@thetimmy.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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
Hi David: The plugin install is done by the P2 director script which should be downloaded to /tmp (then deleted at completion). I haven't made any changes in the way that works. I haven't run go_wolips from within my target directory but I'll give it a try to test. What's interesting from your report is that the error indicates that the path does not point to a folder - which is clearly there in your screenshot. Tim On Apr 26, 2013, at 11:54 AM, David Holt programming...@mac.com wrote: Hi Tim, Fortuitously I am installing the tools on a brand new mac. I created a Tools folder, put go_wolips inside, cd into Tools and run the following command: . go_wolips . The result is that I have a working install of Eclipse, but none of the plugins. Here is the output from my terminal if it is helpful: Screen Shot 2013-04-26 at 11.51.25 AM.png Screen Shot 2013-04-26 at 11.52.53 AM.png There seems to be a small error in the file path for the plugin installer unless I have done something incorrectly? Thanks, David On 2013-04-26, at 9:07 AM, Tim Worman li...@thetimmy.com wrote: All: I forked and updated David LeBer's go_wolips script (which was a fork of Mike Schrag's original). My fork lives here: https://gist.github.com/timsquared/5454092 It has been updated to download Eclipse 3.8.2 (Juno) and also use the Juno update site. Other updated update sites (and installation units) include: groovy, subversive, m2eclipse, and buckminster. It runs well on my install of OS X 10.8.X. I am interested to know if these component updates cause anyone issues in their workflow. I do not use these components. My intention is to update Golipse with this - I also think it is valuable to keep repos of both Golipse and the embedded script for flexibility. It'd probably be a good idea to move this script repo to the WOCommunity GitHub. It also may be a good idea to move the P2 director script from Mike Schrag's repo to WOCommunity. It is called from within go_wolips. While it works great as is, future changes to Eclipse (or P2 Equinox) could impact it. Tim UCLA GSEIS On Apr 24, 2013, at 10:42 AM, Tim Worman li...@thetimmy.com wrote: Awesome, thanks David. I knew it was a wrapper for the embedded script and I was about to go down the road of troubleshooting it. But if all we need is to drop an update script in, that's great. If it's helpful, I will probably still invest some time to get familiar with the script and how p2 works. Tim On Apr 24, 2013, at 10:32 AM, David LeBer dleber_wo...@codeferous.com wrote: I created Golipse as just a cocoa wrapper around the go_wolips script that Mike S created. This is my clone of his gist: https://gist.github.com/rebeld/622437 It's probably out of sync with the app at this point. I don't know if there is a wocommunity gist version of it. Anyway, you should be able to run it just from the command line, tweak it until it works, and then replace the script in the project. D -- David LeBer Codeferous Software On 2013-04-24, at 12:43 PM, Tim Worman li...@thetimmy.com wrote: OK, I'm learning more abut how this works. The P2 installer should be part of the eclipse sdk download. So, to answer your question, the requests probably do come from java. They may be timing out. I'm gonna dig in and learn about this a bit in the hopes that I can serve the community by understanding how it works. I'm gonna start testing pieces of the script. If anyone has already looked into this or has some other reason I shouldn't invest time in this, let me know. Anyone who wants to assist, message me. Tim UCLA GSEIS On Apr 23, 2013, at 10:18 PM, Bastian Triller bastian.tril...@gmail.com wrote: Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM
Re: anyone want to test an update to golipse?
It only works with the full path as an argument. I am going to insert a check for . though and I will push the change up. It's a reasonable thing to check for and replace. You could do this now though without the change: . go_wolips `pwd` Tim On Apr 26, 2013, at 12:20 PM, Tim Worman li...@thetimmy.com wrote: Hi David: The plugin install is done by the P2 director script which should be downloaded to /tmp (then deleted at completion). I haven't made any changes in the way that works. I haven't run go_wolips from within my target directory but I'll give it a try to test. What's interesting from your report is that the error indicates that the path does not point to a folder - which is clearly there in your screenshot. Tim On Apr 26, 2013, at 11:54 AM, David Holt programming...@mac.com wrote: Hi Tim, Fortuitously I am installing the tools on a brand new mac. I created a Tools folder, put go_wolips inside, cd into Tools and run the following command: . go_wolips . The result is that I have a working install of Eclipse, but none of the plugins. Here is the output from my terminal if it is helpful: Screen Shot 2013-04-26 at 11.51.25 AM.png Screen Shot 2013-04-26 at 11.52.53 AM.png There seems to be a small error in the file path for the plugin installer unless I have done something incorrectly? Thanks, David On 2013-04-26, at 9:07 AM, Tim Worman li...@thetimmy.com wrote: All: I forked and updated David LeBer's go_wolips script (which was a fork of Mike Schrag's original). My fork lives here: https://gist.github.com/timsquared/5454092 It has been updated to download Eclipse 3.8.2 (Juno) and also use the Juno update site. Other updated update sites (and installation units) include: groovy, subversive, m2eclipse, and buckminster. It runs well on my install of OS X 10.8.X. I am interested to know if these component updates cause anyone issues in their workflow. I do not use these components. My intention is to update Golipse with this - I also think it is valuable to keep repos of both Golipse and the embedded script for flexibility. It'd probably be a good idea to move this script repo to the WOCommunity GitHub. It also may be a good idea to move the P2 director script from Mike Schrag's repo to WOCommunity. It is called from within go_wolips. While it works great as is, future changes to Eclipse (or P2 Equinox) could impact it. Tim UCLA GSEIS On Apr 24, 2013, at 10:42 AM, Tim Worman li...@thetimmy.com wrote: Awesome, thanks David. I knew it was a wrapper for the embedded script and I was about to go down the road of troubleshooting it. But if all we need is to drop an update script in, that's great. If it's helpful, I will probably still invest some time to get familiar with the script and how p2 works. Tim On Apr 24, 2013, at 10:32 AM, David LeBer dleber_wo...@codeferous.com wrote: I created Golipse as just a cocoa wrapper around the go_wolips script that Mike S created. This is my clone of his gist: https://gist.github.com/rebeld/622437 It's probably out of sync with the app at this point. I don't know if there is a wocommunity gist version of it. Anyway, you should be able to run it just from the command line, tweak it until it works, and then replace the script in the project. D -- David LeBer Codeferous Software On 2013-04-24, at 12:43 PM, Tim Worman li...@thetimmy.com wrote: OK, I'm learning more abut how this works. The P2 installer should be part of the eclipse sdk download. So, to answer your question, the requests probably do come from java. They may be timing out. I'm gonna dig in and learn about this a bit in the hopes that I can serve the community by understanding how it works. I'm gonna start testing pieces of the script. If anyone has already looked into this or has some other reason I shouldn't invest time in this, let me know. Anyone who wants to assist, message me. Tim UCLA GSEIS On Apr 23, 2013, at 10:18 PM, Bastian Triller bastian.tril...@gmail.com wrote: Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM
Re: anyone want to test an update to golipse?
OK, I'm learning more abut how this works. The P2 installer should be part of the eclipse sdk download. So, to answer your question, the requests probably do come from java. They may be timing out. I'm gonna dig in and learn about this a bit in the hopes that I can serve the community by understanding how it works. I'm gonna start testing pieces of the script. If anyone has already looked into this or has some other reason I shouldn't invest time in this, let me know. Anyone who wants to assist, message me. Tim UCLA GSEIS On Apr 23, 2013, at 10:18 PM, Bastian Triller bastian.tril...@gmail.com wrote: Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
I created Golipse as just a cocoa wrapper around the go_wolips script that Mike S created. This is my clone of his gist: https://gist.github.com/rebeld/622437 It's probably out of sync with the app at this point. I don't know if there is a wocommunity gist version of it. Anyway, you should be able to run it just from the command line, tweak it until it works, and then replace the script in the project. D -- David LeBer Codeferous Software On 2013-04-24, at 12:43 PM, Tim Worman li...@thetimmy.com wrote: OK, I'm learning more abut how this works. The P2 installer should be part of the eclipse sdk download. So, to answer your question, the requests probably do come from java. They may be timing out. I'm gonna dig in and learn about this a bit in the hopes that I can serve the community by understanding how it works. I'm gonna start testing pieces of the script. If anyone has already looked into this or has some other reason I shouldn't invest time in this, let me know. Anyone who wants to assist, message me. Tim UCLA GSEIS On Apr 23, 2013, at 10:18 PM, Bastian Triller bastian.tril...@gmail.com wrote: Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
Awesome, thanks David. I knew it was a wrapper for the embedded script and I was about to go down the road of troubleshooting it. But if all we need is to drop an update script in, that's great. If it's helpful, I will probably still invest some time to get familiar with the script and how p2 works. Tim On Apr 24, 2013, at 10:32 AM, David LeBer dleber_wo...@codeferous.com wrote: I created Golipse as just a cocoa wrapper around the go_wolips script that Mike S created. This is my clone of his gist: https://gist.github.com/rebeld/622437 It's probably out of sync with the app at this point. I don't know if there is a wocommunity gist version of it. Anyway, you should be able to run it just from the command line, tweak it until it works, and then replace the script in the project. D -- David LeBer Codeferous Software On 2013-04-24, at 12:43 PM, Tim Worman li...@thetimmy.com wrote: OK, I'm learning more abut how this works. The P2 installer should be part of the eclipse sdk download. So, to answer your question, the requests probably do come from java. They may be timing out. I'm gonna dig in and learn about this a bit in the hopes that I can serve the community by understanding how it works. I'm gonna start testing pieces of the script. If anyone has already looked into this or has some other reason I shouldn't invest time in this, let me know. Anyone who wants to assist, message me. Tim UCLA GSEIS On Apr 23, 2013, at 10:18 PM, Bastian Triller bastian.tril...@gmail.com wrote: Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/dleber_wodev%40codeferous.com This email sent to dleber_wo...@codeferous.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com
anyone want to test an update to golipse?
I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Also, if anyone wants to test it, let me know. Tim ___ 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
Re: anyone want to test an update to golipse?
On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: anyone want to test an update to golipse?
Are these requests to d.e.o from java? Do they timeout? If that's the case, try adding -Djava.net.preferIPv4Stack=true to eclipse.ini or to the java commandline. Am 23.04.2013 23:26 schrieb Tim Worman li...@thetimmy.com: Well, this is what a drop-in replacement of Eclipse 3.8.2 download with the same updates yields. Looks like some of the update sites aren't working. The logging doesn't report which items it is failing to get. Neither wolips nor workspacemechanic are in the plugins folder - so it looks like those definitely failed. Possibly the issue is actually that 3.8 requires an updated P2 script. Actually, I think the result is the same with the current Golipse(3.7) - so I'd say it is broken. Downloading and Installing the recommended Eclipse plugins ... Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Apr 23, 2013 2:10:50 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Installation failed. The installable unit org.zeroturnaround.eclipse.debug.feature.feature.group has not been found. Application failed, log file location: /Users/worman/Desktop/eclipse/configuration/1366751366848.log Cleaning up … Tim UCLA GSEIS On Apr 23, 2013, at 11:31 AM, Bastian Triller bastian.tril...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:13 PM, Tim Worman li...@thetimmy.com wrote: I'm looking at updating the Golipse app to install Eclipse/WOLips 3.8. I'm just beginning so I'm not sure yet which options might break yet. I'm examining the script, looking at all the plugins that get installed and their associated update sites. The update site for WOLips is: http://wocommunity.org/wolips/3.7/stable Do we have an update site for a WOLips 3.8 or should 3.7 stable be used with Eclipse 3.8? Eclipse 3.8 is only a bugfix release for 3.7, so WOLips 3.7 works with Eclipse 3.8 as well. Also, if anyone wants to test it, let me know. Tim ___ 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/bastian.triller%40gmail.com This email sent to bastian.tril...@gmail.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/archive%40mail-archive.com This email sent to arch...@mail-archive.com
test, please ignore
bounce test ___ 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
test - ignore
test - ignore ___ 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
test, please ignore
test, please ignore This email, including any attachments, is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient you must not disseminate, distribute or copy any part of this email nor take any action in reliance on it. If you have received this in error please notify the sender immediately by email or phone +44 (0)1702 426400 and delete this email and any attachments from your system. Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard-copy version. OneStep Solutions LLP is registered in England and Wales under registration number OC337173 and has its registered office at 44 The Pantiles, Tunbridge Wells, Kent, TN2 5TN. ___ 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
test
TEST please ignore (have not received anything from the apple list server for two days) ___ 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
how open database connection for test
hi, I want open database connection for create unit testing initialization with database access. I have test: @Test public void test(){ ERXExtensions.initApp(Application.class, new String[0]); EOModel model = new EOModel(new URL(file:///Users/dev1/Documents/head/fitTest/ObjetsMetierCariatides/build/ObjetsMetierCariatides.framework/Resources/ModeleInitialisationDictionnaire.eomodeld)); this.connexionProperties = new NSMutableDictionary(model.connectionDictionary()); this.tconnexionProperties.addEntriesFromDictionary(new NSDictionary(new Object[] { , , jdbc:oracle:thin:@xxx.xxx.xxx.xxx::SID, oracle.jdbc.driver.OracleDriver, MyOraclePlugIn }, new Object[] { username, password, URL, driver, plugin })); model.setConnectionDictionary(this.connexionProperties); EOModelGroup.defaultGroup().addModel(model); } and when i execute the last line i have: avr. 16 14:02:54 test[-1] WARN er.extensions.eof.ERXModelGroup - The EOModel 'erprototypes' has an empty connection dictionary. avr. 16 14:02:54 test[-1] WARN er.extensions.eof.ERXModelGroup - The EOModel 'erprototypes' has an empty connection dictionary. avr. 16 14:02:54 test[-1] ERROR er.extensions.eof.ERXEntityClassDescription - Error registering model: EOMODELNAME ClassNotFoundException: CLASSNAME at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at er.extensions.eof.ERXEntityClassDescription$Factory.registerDescriptionForEntity(ERXEntityClassDescription.java:580) at er.extensions.eof.ERXEntityClassDescription$Factory.registerDescriptionForEntitiesInModel(ERXEntityClassDescription.java:534) at er.extensions.eof.ERXEntityClassDescription$Factory.modelWasAdded(ERXEntityClassDescription.java:343) ... skipped 8 stack elements at er.extensions.eof.ERXModelGroup.addModel(ERXModelGroup.java:445) at er.extensions.eof.ERXModelGroup.addModelWithPathURL(ERXModelGroup.java:537) at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles(ERXModelGroup.java:271) at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:145) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:225) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:158) at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:365) at your.app.testApplication.test(testApplication.java:118) ... skipped 4 stack elements at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) but the class CLASSNAME exist so i don't know if the problem is a ClassNotFoundException. And i don't know if the database access is correctly opened. best regards G.ALEXANDRE ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev
Re: how open database connection for test
Hi, why do you have to load a model ? When needed, Wonder should load the models it founds in the classpath. If you want to override the connection dicitonnary, you can just set the right Wonder properties : http://wiki.wocommunity.org/display/WO/The+EOModel#TheEOModel-ConnectionDictionary Cheers, Alex 2012/4/17 g.alexandre g.alexan...@symaris.com hi, I want open database connection for create unit testing initialization with database access. I have test: @Test public void test(){ ERXExtensions.initApp(Application.*class*, *new* String[0]); EOModel model = *new* EOModel(*new* URL( file:///Users/dev1/Documents/head/fitTest/ObjetsMetierCariatides/build/ObjetsMetierCariatides.framework/Resources/ModeleInitialisationDictionnaire.eomodeld )); *this*.connexionProperties = *new*NSMutableDictionary(model.connectionDictionary()) ; *this*.tconnexionProperties.addEntriesFromDictionary(*new*NSDictionary( *new* Object[] { , , jdbc:oracle:thin:@xxx.xxx.xxx.xxx::SID, oracle.jdbc.driver.OracleDriver, MyOraclePlugIn }, *new* Object[] { username, password, URL, driver, plugin })); model.setConnectionDictionary(*this*.connexionProperties); EOModelGroup.defaultGroup().addModel(model); } and when i execute the last line i have: avr. 16 14:02:54 test[-1] WARN er.extensions.eof.ERXModelGroup - The EOModel 'erprototypes' has an empty connection dictionary. avr. 16 14:02:54 test[-1] WARN er.extensions.eof.ERXModelGroup - The EOModel 'erprototypes' has an empty connection dictionary. avr. 16 14:02:54 test[-1] ERROR er.extensions.eof.ERXEntityClassDescription - Error registering model: EOMODELNAME ClassNotFoundException: CLASSNAME at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at er.extensions.eof.ERXEntityClassDescription$Factory.registerDescriptionForEntity( ERXEntityClassDescription.java:580) at er.extensions.eof.ERXEntityClassDescription$Factory.registerDescriptionForEntitiesInModel( ERXEntityClassDescription.java:534) at er.extensions.eof.ERXEntityClassDescription$Factory.modelWasAdded( ERXEntityClassDescription.java:343) ... skipped 8 stack elements at er.extensions.eof.ERXModelGroup.addModel(ERXModelGroup.java:445) at er.extensions.eof.ERXModelGroup.addModelWithPathURL( ERXModelGroup.java:537) at er.extensions.eof.ERXModelGroup.loadModelsFromLoadedBundles( ERXModelGroup.java:271) at er.extensions.ERXExtensions.defaultModelGroup(ERXExtensions.java:145) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:225) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:158) at com.webobjects.eoaccess.EOModelGroup.defaultGroup( EOModelGroup.java:365) at your.app.testApplication.test(testApplication.java:118) ... skipped 4 stack elements at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run( ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively( FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate( InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored( BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run( TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:683
Test
Sorry, it is a Test Ken ___ 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
JUnit Test Initialization
Hi Everyone, I'm writing my first JUnit test for a WebObjects Application and I've hit a roadblock. I need access to some of the data in the database. When I just try to run the test I get an error: java.lang.IllegalArgumentException: An object store for the entity Account 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. Seems I need to initialize my application, so I tried this advice on the wiki: http://wiki.objectstyle.org/confluence/display/WO/Testing-JUnit+and+TestNGto initialize the app, but then I get a NPE: java.lang.NullPointerException at er.extensions.foundation.ERXConfigurationManager.commandLineArgumentProperties(ERXConfigurationManager.java:170) at er.extensions.foundation.ERXConfigurationManager.applyConfiguration(ERXConfigurationManager.java:300) at er.extensions.foundation.ERXConfigurationManager.loadConfiguration(ERXConfigurationManager.java:289) at er.extensions.ERXExtensions.finishInitialization(ERXExtensions.java:261) at er.extensions.ERXFrameworkPrincipal$Observer.willFinishInitialization(ERXFrameworkPrincipal.java:97) 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 er.extensions.appserver.ERXApplication.init(ERXApplication.java:1035) at com.example.Application.init(Application.java:21) at com.example.tests.YourOrdersTest.initWO(YourOrdersTest.java:51) snip and the console message: It seems that your application class com.example.Application did not call er.extensions.appserver.ERXApplication.main(argv[], applicationClass) method. Please modify your Application.java as the followings so that er.extensions.foundation.ERXConfigurationManager can provide its rapid turnaround feature completely. Any help setting up this test would be greatly appreciated. Thanks, Joe ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JUnit Test Initialization
There are varying levels of initialization you can perform. One of the shorter ones is this: @BeforeClass public static void setUpBeforeClass() throws Exception { ERXExtensions.initEOF(new String[0]); } You have to have the working directory set to ${working_dir_loc_WOLips:YOURPROJECT} for this to work. John On Tue, Feb 1, 2011 at 3:44 PM, Joe Kramer jkra...@cyberapps.net wrote: Hi Everyone, I'm writing my first JUnit test for a WebObjects Application and I've hit a roadblock. I need access to some of the data in the database. When I just try to run the test I get an error: java.lang.IllegalArgumentException: An object store for the entity Account 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. Seems I need to initialize my application, so I tried this advice on the wiki: http://wiki.objectstyle.org/confluence/display/WO/Testing-JUnit+and+TestNGto initialize the app, but then I get a NPE: java.lang.NullPointerException at er.extensions.foundation.ERXConfigurationManager.commandLineArgumentProperties(ERXConfigurationManager.java:170) at er.extensions.foundation.ERXConfigurationManager.applyConfiguration(ERXConfigurationManager.java:300) at er.extensions.foundation.ERXConfigurationManager.loadConfiguration(ERXConfigurationManager.java:289) at er.extensions.ERXExtensions.finishInitialization(ERXExtensions.java:261) at er.extensions.ERXFrameworkPrincipal$Observer.willFinishInitialization(ERXFrameworkPrincipal.java:97) 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 er.extensions.appserver.ERXApplication.init(ERXApplication.java:1035) at com.example.Application.init(Application.java:21) at com.example.tests.YourOrdersTest.initWO(YourOrdersTest.java:51) snip and the console message: It seems that your application class com.example.Application did not call er.extensions.appserver.ERXApplication.main(argv[], applicationClass) method. Please modify your Application.java as the followings so that er.extensions.foundation.ERXConfigurationManager can provide its rapid turnaround feature completely. Any help setting up this test would be greatly appreciated. Thanks, Joe ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
test
since my mac.com emails are not going thru it seems.. let's switch to gmail address... ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: test
Hi Kierian, to further test your new e-mail, could you tell me if you distributed the long response utilities you talked about at WOWODC2010 ? and how to get to it. If so is there a place that uses it that I can peruse ... 8-) Cheers. On 2010-09-13, at 13:51 , Kieran Kelleher wrote: since my mac.com emails are not going thru it seems.. let's switch to gmail address... ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/louisdemers%40mac.com This email sent to louisdem...@mac.com Louis Demers eng. www.obzerv.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: test
Hi Louis, Hope you are well. The reusable long response functionality is not entirely committed to Wonder yet (some of the java.util.concurrent utility classes are committed to er.extensions.concurrency already) since some refactoring is needed before committing it. Meanwhile you can get the beta versions of the GenericAjaxLongResponsePage and some related controller classes in the repository that was used for the WOWODC example jasper reports app. The details are in the jasper reports presentation slides, which are available in the WOWODC 2010 podcast feed already. Meanwhile the class names and API of what gets committed to Wonder will likely be much different to the beta/demo projects in that WOWODC2010 repository. ERJasperReports is committed to Wonder, albeit with classes/API changes since WOWODC, and the ERJasperReportsExample will be committed once I get the reusable long response stuff that it depends on fully committed to generic Wonder first. Hopefully all will be committed and documented before end of this month. The delay is due to the fact that I have an unusually heavy workload right now. :-) If you don't have the jasper reports presentation slides or have not succeeded in connecting to the WOWODC 2010 podcast feed, let me know and I can email the repository details to you. Regards, Kieran On Sep 13, 2010, at 9:12 PM, Louis Demers wrote: Hi Kierian, to further test your new e-mail, could you tell me if you distributed the long response utilities you talked about at WOWODC2010 ? and how to get to it. If so is there a place that uses it that I can peruse ... 8-) Cheers. On 2010-09-13, at 13:51 , Kieran Kelleher wrote: since my mac.com emails are not going thru it seems.. let's switch to gmail address... ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/louisdemers%40mac.com This email sent to louisdem...@mac.com Louis Demers eng. www.obzerv.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: test
Hi Kieran On 2010-09-13, at 23:26 , Kieran Kelleher wrote: Hi Louis, Hope you are well. pump up and excited since meeting you all at WOWODC... 8-) ... interesting and useful info deleted... Hopefully all will be committed and documented before end of this month. The delay is due to the fact that I have an unusually heavy workload right now. :-) I understand. If you don't mind, a small e-mail to announce its availability would be greatly appreciated. If you don't have the jasper reports presentation slides or have not succeeded in connecting to the WOWODC 2010 podcast feed, let me know and I can email the repository details to you. I have the slides and i'm downloading the presentation video as I write this. Thank you very Much. Louis PS: your gmail is coming through loud and clear ;-) Regards, Kieran On Sep 13, 2010, at 9:12 PM, Louis Demers wrote: Hi Kierian, to further test your new e-mail, could you tell me if you distributed the long response utilities you talked about at WOWODC2010 ? and how to get to it. If so is there a place that uses it that I can peruse ... 8-) Cheers. Louis Demers eng. www.obzerv.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
This is a test.....
___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
test
Tried send topic twice, but no appeared there Sorry about this, Kevin This e-mail and any attachments to it (the Communication) is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together ANZ). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JUnit test method generation
Thank you for pointing that one out Katya. I did not know about it. It looks really helpful for cases where I would want to include my tests in the same project. It doesn't look like it will handle something like ERXTest very well though, since all the tests are in a separate project. I've just installed it, so I will see if perhaps I'm wrong about that though. Thanks again for the tip! Ramsey On Dec 13, 2009, at 2:45 AM, Katya Yurukova wrote: Hi Ramsey, You should try the moreUnit plug-in for Eclipse. It is capable of adding single method stubs for already existing test classes. It needs a bit of adjustment so it can find your test classes, but if you have some naming convention for your test classes you should be OK. Here's the link: http://moreunit.sourceforge.net/index.html Cheers, Katya On Dec 13, 2009, at 2:30 AM, Ramsey Lee Gurley wrote: On Dec 12, 2009, at 7:02 PM, Ray Kiddy wrote: On Dec 12, 2009, at 8:14 AM, Ramsey Lee Gurley wrote: Hi all, I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class? Ramsey ___ You are asking for a sort of eogeneration for junit tests. (In other words, the EOGenerate keeps a model and the java file synchronized and an analogous thing would be useful for junit tests.) This is not a bad idea. It does seem like a good idea. But, looking at what eclipse provides now, it seems clear that this is not available now. - ray It doesn't even have to go that far, really. I'm just hoping for something like 'generate getters/setters' where it gives you a list of checkboxes and greys out the ones you already have. But it doesn't appear that there's any way to choose an existing test class and insert new tests into it. It always generates a new one. Which means I have to generate a temporary one with all the methods, copy the body, paste it into the old class, then go though the thing deleting the dupes. Yuck :-/ Ramsey ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/katya.yurukova%40tuparev.com This email sent to katya.yuruk...@tuparev.com smime.p7s Description: S/MIME cryptographic signature ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
JUnit test method generation
Hi all, I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class? Ramsey smime.p7s Description: S/MIME cryptographic signature ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JUnit test method generation
On Dec 12, 2009, at 8:14 AM, Ramsey Lee Gurley wrote: Hi all, I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class? Ramsey ___ You are asking for a sort of eogeneration for junit tests. (In other words, the EOGenerate keeps a model and the java file synchronized and an analogous thing would be useful for junit tests.) This is not a bad idea. It does seem like a good idea. But, looking at what eclipse provides now, it seems clear that this is not available now. - ray ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JUnit test method generation
On Dec 12, 2009, at 7:02 PM, Ray Kiddy wrote: On Dec 12, 2009, at 8:14 AM, Ramsey Lee Gurley wrote: Hi all, I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class? Ramsey ___ You are asking for a sort of eogeneration for junit tests. (In other words, the EOGenerate keeps a model and the java file synchronized and an analogous thing would be useful for junit tests.) This is not a bad idea. It does seem like a good idea. But, looking at what eclipse provides now, it seems clear that this is not available now. - ray It doesn't even have to go that far, really. I'm just hoping for something like 'generate getters/setters' where it gives you a list of checkboxes and greys out the ones you already have. But it doesn't appear that there's any way to choose an existing test class and insert new tests into it. It always generates a new one. Which means I have to generate a temporary one with all the methods, copy the body, paste it into the old class, then go though the thing deleting the dupes. Yuck :-/ Ramsey smime.p7s Description: S/MIME cryptographic signature ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: JUnit test method generation
Hi Ramsey, You should try the moreUnit plug-in for Eclipse. It is capable of adding single method stubs for already existing test classes. It needs a bit of adjustment so it can find your test classes, but if you have some naming convention for your test classes you should be OK. Here's the link: http://moreunit.sourceforge.net/index.html Cheers, Katya On Dec 13, 2009, at 2:30 AM, Ramsey Lee Gurley wrote: On Dec 12, 2009, at 7:02 PM, Ray Kiddy wrote: On Dec 12, 2009, at 8:14 AM, Ramsey Lee Gurley wrote: Hi all, I'm wondering if there is an easier way to generate a JUnit test method stub for a test class that already exists. Let's say I have a class Foo with method bar(). When I generate the JUnit test FooTest in eclipse, I can select the methods and generate the source stub for testBar() and all the other methods on the class. Now if I add the method baz(), is there an easy way to generate the stub for that test method, or do I have to key them in manually ever after? Is there some way to link the two classes so that Eclipse automatically generates the test methods as new methods are added to the class? Ramsey ___ You are asking for a sort of eogeneration for junit tests. (In other words, the EOGenerate keeps a model and the java file synchronized and an analogous thing would be useful for junit tests.) This is not a bad idea. It does seem like a good idea. But, looking at what eclipse provides now, it seems clear that this is not available now. - ray It doesn't even have to go that far, really. I'm just hoping for something like 'generate getters/setters' where it gives you a list of checkboxes and greys out the ones you already have. But it doesn't appear that there's any way to choose an existing test class and insert new tests into it. It always generates a new one. Which means I have to generate a temporary one with all the methods, copy the body, paste it into the old class, then go though the thing deleting the dupes. Yuck :-/ Ramsey ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/katya.yurukova%40tuparev.com This email sent to katya.yuruk...@tuparev.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
I am running to some annoying stuff using JMeter to test my wo app. I used the HTTP Proxy Server to layout the samplers. Then had the Regular expression extractor to handle the session_id. But when I run the JMeter script. I often get a You backtracked too far error. On some of the sample. I think this is caused by the url segment after the session id (whos name escapes me as of this moment) e.g. .../App.woa/sessionid/*50.0.0.0.2* - not in sync with the process. Can anyone tell me how I can solve this? Thanks, Amiel On Mon, May 18, 2009 at 9:08 PM, Antoine LAGIER alag...@algodata.fr wrote: You can use-it, it works very well. Le 18 mai 09 à 08:41, Amiel Montecillo a écrit : I am trying out JMeter for the first time. It seems straightforward and powerful. May I ask what's the best way to determine that a particular request operation succeeded? Is it through the use of Response Assertions checking for some desired text to be returned? Amiel On Mon, May 11, 2009 at 3:53 PM, Antoine LAGIER alag...@algodata.frwrote: Thank you John, Other useful link http://wiki.objectstyle.org/confluence/display/WO/Testing-Load+Testing+WO+Apps+with+JMeter ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bosyotech%40gmail.com This email sent to bosyot...@gmail.com -- socket error: unable to connect to 127.0.0.1 -- socket error: unable to connect to 127.0.0.1 ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
I am trying out JMeter for the first time. It seems straightforward and powerful. May I ask what's the best way to determine that a particular request operation succeeded? Is it through the use of Response Assertions checking for some desired text to be returned? Amiel On Mon, May 11, 2009 at 3:53 PM, Antoine LAGIER alag...@algodata.fr wrote: Thank you John, Other useful link http://wiki.objectstyle.org/confluence/display/WO/Testing-Load+Testing+WO+Apps+with+JMeter ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bosyotech%40gmail.com This email sent to bosyot...@gmail.com -- socket error: unable to connect to 127.0.0.1 ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
You can use-it, it works very well. Le 18 mai 09 à 08:41, Amiel Montecillo a écrit : I am trying out JMeter for the first time. It seems straightforward and powerful. May I ask what's the best way to determine that a particular request operation succeeded? Is it through the use of Response Assertions checking for some desired text to be returned? Amiel On Mon, May 11, 2009 at 3:53 PM, Antoine LAGIER alag...@algodata.fr wrote: Thank you John, Other useful link http://wiki.objectstyle.org/confluence/display/WO/Testing-Load+Testing+WO+Apps+with+JMeter ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bosyotech%40gmail.com This email sent to bosyot...@gmail.com -- socket error: unable to connect to 127.0.0.1 ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
Thank you John, Other useful link http://wiki.objectstyle.org/confluence/display/WO/Testing-Load+Testing+WO+Apps+with+JMeter ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
We use Jmeter all the time to test our WO apps. The trick is to use the Regular Expression Extractor component (located under Post Processors). Add this component after the first WO page that creates the session id. Set the following fields: Reference Name: wovars Regular Expression: /MyApp/WebObjects/MyApp.woa/wo/([^/]+)/ Template: $1$ Match No: 1 Default Value: On your jmeter scripts replace the session id with this path: /MyApp/WebObjects/MyApp/woa/wo/${wovars_g1}/1.1.x.x.x Make sure your thread group is set to start a new session for each iteration. HTH Dov Rosenberg On 5/8/09 6:05 PM, Antoine LAGIER alag...@algodata.fr wrote: We try to use a simple test with Jmeter to test a WO dev. - In this script we try to connect to the site /cgi-bin/WebObjects/myapp.woa/ - Login with a account : /cgi-bin/WebObjects/myapp.woa/2/wa/LoginAction/doLogin so we need to get and set the wosid (wosid = 3V8YgnSQikFjJleLOXbGzw ) and to get and set the number of the instance (/2 ) in the Jmeter process We are looking for any help, any example script to do this test Regards, ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/drosenberg%40inquira.com This email sent to drosenb...@inquira.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Using Jmeter to test WO
We try to use a simple test with Jmeter to test a WO dev. - In this script we try to connect to the site /cgi-bin/WebObjects/myapp.woa/ - Login with a account : /cgi-bin/WebObjects/myapp.woa/2/wa/LoginAction/doLogin so we need to get and set the wosid (wosid = 3V8YgnSQikFjJleLOXbGzw ) and to get and set the number of the instance (/2 ) in the Jmeter process We are looking for any help, any example script to do this test Regards, ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using Jmeter to test WO
On May 8, 2009, at 6:05 PM, Antoine LAGIER wrote: We try to use a simple test with Jmeter to test a WO dev. so we need to get and set the wosid (wosid = 3V8YgnSQikFjJleLOXbGzw ) and to get and set the number of the instance (/2 ) in the Jmeter process You don't actually need to get or set it, just tell jMeter that it's a session id and it will handle it properly from request to request (using the one that's returned rather than the one that was recorded). Example here: http://jakarta.apache.org/jmeter/usermanual/build-adv-web-test-plan.html#session_url_rewriting Reference here: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_URL_Re-writing_Modifier John ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Problem loading EOModel in a unit test on Windows
Hi Jake Actually...the first thing when we learned WO on Windows is don't use white spaces in the project path. :) So the spaces in all project paths e.g. C:\Document and Settings is avoided. I have just updated wiki to include this overlook unwritten tip. http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Development-Development+on+Windows Cheers Cheong Hee Message: 9 Date: Wed, 29 Apr 2009 10:09:12 -0300 From: Henrique Prange hpra...@gmail.com Subject: Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles) To: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Message-ID: 49f85178.1010...@gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi Jake, The problem is caused by white spaces in the path. Do not put WO libraries/projects on C:\Documents and Settings. I've reported the bug 5941664 on 16-May-2008 with a simple suggestion about how to solve the problem. The issue is still open as you can see in the attached screenshot. Cheers, Henrique PS.: WO applications deployed as WAR on Windows only work if the servlet container is installed in a path WITHOUT white spaces. Otherwise, you'll have a similar exception while starting the container. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
Hi Mike, Copied from bug 5941664: This problem occurs because of a conversion from URL to String in the NSBundle class. The Java URLDecoder class could be used to solve this problem. Below is a possible fix that could be done on __exctractStringFromURL private method of NSBundle: String urlPath = URLDecoder.decode( anURL.getPath(), UTF-8 ); It is not a patch, but isn't it clear? :) Cheers, Henrique Mike Schrag wrote: (as an aside - wouldn't it be nice if this were an open source project and we could see each other's bug reports and submit patches? - one can only dream) dream away, dreamer ... jad works great, though. always submit a patch if you have one :) ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
Today I finally decided to see if I could find out why our suite of EO unit tests kept failing on Windows while passing on Mac OS X and Linux (don't ask me why I'm using Windows). All our EO unit tests have a common parent class that has a @BeforeClass method that makes sure the EOModel has been loaded (because in some circumstances - such as when being run as part of a build, the model wasn't loaded when our unit tests needed it). This method attempts to load the model if it hasn't been loaded by first calling: EOModelGroup.defaultGroup().modelNamed(BLAH); to see if it has been loaded and then manually loads the group if it isn't there. The problem was that on Windows EOModelGroup.defaultGroup() was throwing an exception: java.lang.IllegalArgumentException: Attempt to insert null into an com.webobjects.foundation.NSMutableArray. at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239) at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700) at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306) at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333) at com.bbc.fmtj.cps.enterprise.eo.CPSEnterpriseTestCase.loadModel(CPSEnterpriseTestCase.java:283) The 'attempt to insert null' was happening because the 'modelGroupForLoadedBundles()' method tries to make a list of all the loaded bundles by first adding the 'NSBundle.mainBundle()' to a list and then adding all of the 'NSBundle.frameworkBundles()'. The problem is that when running a unit test on Windows NSBundle.mainBundle() returns null and 'modelGroupForLoadedBundles()' doesn't bother to check for null before adding the 'main bundle' to the list of 'loaded bundles'. So - why does NSBundle.mainBundle() return null on Windows but not on OS X? - Good question! I don't pretend to understand the mystery that is NSBundle, but here's what I think is happening. NSBundle has a bunch of static initialisation code that runs when the NSBundle class is loaded. This initialisation code first tries to load (old-style .framework I assume) 'bundles' from a directory specified by the 'webobjects.user.dir' property. If this property has not been set, it then looks in the current application's directory. If it is unable to load any 'bundles' from these locations it then asks the Java ClassLoader for a list of URLs to all the Info.plist files found inside of any .jars that are on the classpath. Now I haven't 'installed' WebObjects on my Windows box (this seems like an out-dated concept to me - I should just be able to reference the .jars) so it is this final method of 'bundle loading' that I'm relying on. The problem is - it is broken on non-unix platforms. Once NSBundle has got a list of URLs to all the Info.plist files it tries to turn this in to a list of paths to the .jar files containing the Info.plist files. For example, it wants to turn this: jar:file:/C:/Documents%20and%20Settings/.../JavaEOAccess-5.4.2.jar!/Resources/Info.plist in to this: C:\Documents%20and%20Settings\...\JavaEOAccess-5.4.2.jar The problem is that the method that tries to do this (__exctractStringFromURL) isn't quite right. The current implementation returns a String like this: /C:/Documents%20and%20Settings/.../JavaEOAccess-5.4.2.jar (note the leading slash and that the slashes are the wrong kind) Later on in the initialisation, NSBundle tries to 'normalise' this path before attempting to load the bundle from the path. When the 'NormalizeExistingBundlePath()' method is passed the malformed file path, it attempts to create a new File object - using the malformed file path and as a result the 'normalised' path is null. Finally, NSBundle tries to load the actual bundle from the given path and obviously fails to load anything from a null path. Hence no 'bundles' are loaded at all - which begs the question - how does WebObjects even work on Windows at all if NSBundle isn't working? (and I don't know the answer to that question). Fixing this should be simple. __exctractStringFromURL() needs to be re-written to return a proper (platform appropriate) file path (perhaps by creating a URI using the trimmed path component of the original jar: URL and then creating a File using this URI and asking it for its getPath()). In the meantime, I think I can work around this problem in my code by calling NSBundle._bundleWithPathShouldCreateIsJar() myself to load all of the bundles that NSBundle's initialisation code should've loaded anyway - and then manually set the 'main bundle' by calling NSBundle._setMainBundle(). So, now I've gotten to the bottom of this - I have two questions: 1. Can anyone explain why WebObjects works on Windows when I deploy a .WAR containing all the libraries as .jars given that NSBundle seems broken on Windows? 2. Shall I bother submitting a bug report via Radar (given that Mike fixed the last bug I found before I'd managed to finish writing the bug report)? Thanks, Jake
Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
2. Shall I bother submitting a bug report via Radar (given that Mike fixed the last bug I found before I'd managed to finish writing the bug report)? yeah .. because this one is annoying :) ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
Hi Jake, The problem is caused by white spaces in the path. Do not put WO libraries/projects on C:\Documents and Settings. I've reported the bug 5941664 on 16-May-2008 with a simple suggestion about how to solve the problem. The issue is still open as you can see in the attached screenshot. Cheers, Henrique PS.: WO applications deployed as WAR on Windows only work if the servlet container is installed in a path WITHOUT white spaces. Otherwise, you'll have a similar exception while starting the container. Jake MacMullin wrote: Today I finally decided to see if I could find out why our suite of EO unit tests kept failing on Windows while passing on Mac OS X and Linux (don't ask me why I'm using Windows). All our EO unit tests have a common parent class that has a @BeforeClass method that makes sure the EOModel has been loaded (because in some circumstances - such as when being run as part of a build, the model wasn't loaded when our unit tests needed it). This method attempts to load the model if it hasn't been loaded by first calling: EOModelGroup.defaultGroup().modelNamed(BLAH); to see if it has been loaded and then manually loads the group if it isn't there. The problem was that on Windows EOModelGroup.defaultGroup() was throwing an exception: java.lang.IllegalArgumentException: Attempt to insert null into an com.webobjects.foundation.NSMutableArray. at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239) at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700) at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306) at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333) at com.bbc.fmtj.cps.enterprise.eo.CPSEnterpriseTestCase.loadModel(CPSEnterpriseTestCase.java:283) The 'attempt to insert null' was happening because the 'modelGroupForLoadedBundles()' method tries to make a list of all the loaded bundles by first adding the 'NSBundle.mainBundle()' to a list and then adding all of the 'NSBundle.frameworkBundles()'. The problem is that when running a unit test on Windows NSBundle.mainBundle() returns null and 'modelGroupForLoadedBundles()' doesn't bother to check for null before adding the 'main bundle' to the list of 'loaded bundles'. So - why does NSBundle.mainBundle() return null on Windows but not on OS X? - Good question! I don't pretend to understand the mystery that is NSBundle, but here's what I think is happening. NSBundle has a bunch of static initialisation code that runs when the NSBundle class is loaded. This initialisation code first tries to load (old-style .framework I assume) 'bundles' from a directory specified by the 'webobjects.user.dir' property. If this property has not been set, it then looks in the current application's directory. If it is unable to load any 'bundles' from these locations it then asks the Java ClassLoader for a list of URLs to all the Info.plist files found inside of any .jars that are on the classpath. Now I haven't 'installed' WebObjects on my Windows box (this seems like an out-dated concept to me - I should just be able to reference the .jars) so it is this final method of 'bundle loading' that I'm relying on. The problem is - it is broken on non-unix platforms. Once NSBundle has got a list of URLs to all the Info.plist files it tries to turn this in to a list of paths to the .jar files containing the Info.plist files. For example, it wants to turn this: jar:file:/C:/Documents%20and%20Settings/.../JavaEOAccess-5.4.2.jar!/Resources/Info.plist in to this: C:\Documents%20and%20Settings\...\JavaEOAccess-5.4.2.jar The problem is that the method that tries to do this (__exctractStringFromURL) isn't quite right. The current implementation returns a String like this: /C:/Documents%20and%20Settings/.../JavaEOAccess-5.4.2.jar (note the leading slash and that the slashes are the wrong kind) Later on in the initialisation, NSBundle tries to 'normalise' this path before attempting to load the bundle from the path. When the 'NormalizeExistingBundlePath()' method is passed the malformed file path, it attempts to create a new File object - using the malformed file path and as a result the 'normalised' path is null. Finally, NSBundle tries to load the actual bundle from the given path and obviously fails to load anything from a null path. Hence no 'bundles' are loaded at all - which begs the question - how does WebObjects even work on Windows at all if NSBundle isn't working? (and I don't know the answer to that question). Fixing this should be simple. __exctractStringFromURL() needs to be re-written to return a proper (platform appropriate) file path (perhaps by creating a URI using the trimmed path component of the original jar: URL and then creating a File using this URI and asking it for its getPath()). In the meantime, I think I can work around this problem in my code by calling
Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
Well, you're right - is it due to spaces in the path... but I still think the problem is in __exctractStringFromURL(). The problem is this method trims the 'path' component of a URL and later it is treated as if it were a file path. One of the main differences between a URL's 'path' component and a 'file path' is that URLs escape spaces as %20, while 'file paths' leave them as spaces. I've attached a unit test demonstrating the problem (and a potential solution) and I've reported the bug to Apple (6841776). Out of interest Henrique - was this the cause of the problem with spaces that you identified? What was your proposed solution? (as an aside - wouldn't it be nice if this were an open source project and we could see each other's bug reports and submit patches? - one can only dream) Cheers, Jake On Thu, Apr 30, 2009 at 9:54 AM, Jake MacMullin jmacmul...@gmail.comwrote: Henrique, Of course - I remember encountering this before. I wonder if it is the root cause of the problem I was encountering (or if the error I think I found in __exctractStringFromURL() is the reason spaces cause problems). Interestingly, I can get my unit tests to work on Windows by manually calling the code that is meant to be called in NSBundle's initialisation. For example, the following works: NSBundle._bundleWithPathShouldCreateIsJar(C:\\Documents and Settings\\username\\.m2\\repository\\com\\webobjects\\JavaEOAccess\\5.4.2\\JavaEOAccess-5.4.2.jar, true, true); That is, after I've done this with all the .jars I need, EOModelGroup.defaultGroup() no longer throws an exception. Out of interest, I'm going to move my .jars so there are no spaces in the path and see if this also solves the problem. Thanks, Jake On Wed, Apr 29, 2009 at 11:09 PM, Henrique Prange hpra...@gmail.comwrote: Hi Jake, The problem is caused by white spaces in the path. Do not put WO libraries/projects on C:\Documents and Settings. I've reported the bug 5941664 on 16-May-2008 with a simple suggestion about how to solve the problem. The issue is still open as you can see in the attached screenshot. Cheers, Henrique PS.: WO applications deployed as WAR on Windows only work if the servlet container is installed in a path WITHOUT white spaces. Otherwise, you'll have a similar exception while starting the container. Jake MacMullin wrote: Today I finally decided to see if I could find out why our suite of EO unit tests kept failing on Windows while passing on Mac OS X and Linux (don't ask me why I'm using Windows). All our EO unit tests have a common parent class that has a @BeforeClass method that makes sure the EOModel has been loaded (because in some circumstances - such as when being run as part of a build, the model wasn't loaded when our unit tests needed it). This method attempts to load the model if it hasn't been loaded by first calling: EOModelGroup.defaultGroup().modelNamed(BLAH); to see if it has been loaded and then manually loads the group if it isn't there. The problem was that on Windows EOModelGroup.defaultGroup() was throwing an exception: java.lang.IllegalArgumentException: Attempt to insert null into an com.webobjects.foundation.NSMutableArray. at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239) at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700) at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306) at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333) at com.bbc.fmtj.cps.enterprise.eo.CPSEnterpriseTestCase.loadModel(CPSEnterpriseTestCase.java:283) The 'attempt to insert null' was happening because the 'modelGroupForLoadedBundles()' method tries to make a list of all the loaded bundles by first adding the 'NSBundle.mainBundle()' to a list and then adding all of the 'NSBundle.frameworkBundles()'. The problem is that when running a unit test on Windows NSBundle.mainBundle() returns null and 'modelGroupForLoadedBundles()' doesn't bother to check for null before adding the 'main bundle' to the list of 'loaded bundles'. So - why does NSBundle.mainBundle() return null on Windows but not on OS X? - Good question! I don't pretend to understand the mystery that is NSBundle, but here's what I think is happening. NSBundle has a bunch of static initialisation code that runs when the NSBundle class is loaded. This initialisation code first tries to load (old-style .framework I assume) 'bundles' from a directory specified by the 'webobjects.user.dir' property. If this property has not been set, it then looks in the current application's directory. If it is unable to load any 'bundles' from these locations it then asks the Java ClassLoader for a list of URLs to all the Info.plist files found inside of any .jars that are on the classpath. Now I haven't 'installed' WebObjects on my Windows box (this seems like an out-dated concept to me - I should just
Re: Problem loading EOModel in a unit test on Windows (NSBundle fails to load .jar bundles)
(as an aside - wouldn't it be nice if this were an open source project and we could see each other's bug reports and submit patches? - one can only dream) dream away, dreamer ... jad works great, though. always submit a patch if you have one :) ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Test, ignore
Testing ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
test
test, sorry for any inconvenience ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Test, please ignore
I have not received any emails for since 1/1/2009. This is just a test to see if the message does arrive at the list. Cheers Cheong Hee ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WO 5.4.2 Test Deploy on Tiger
Hello; I keep getting this NSLog line... Instance Request: Error parsing: instanceRequest type=NSDictionary queryInstance type=NSStringSTATISTICS/queryInstance /instanceRequest Has anybody else had this --- does this mean that I need to update the apache adaptor? cheers. ___ Andrew Lindesay www.lindesay.co.nz ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way(R) to test for existence of a relationship
Just my 2 cents to the discussion ) If we consider the object model to be correct then the task of traversing the array with 2 types of objects seems to be ideal for the Visitor pattern. Am I missing something? On 4/8/08, David Avendasora [EMAIL PROTECTED] wrote: Unfortunately, no. There's _lots_ of differences. There are a number of attributes that they share, but they each have completely different business logic for deriving those values, and they each have attributes that are unique to themselves that would make no sense to have on the other. As uncommon as it is to actually need inheritance in the Model, the amount of work I would have to do to not use it would far exceed the amount of work I have to do to use it. Believe me, I'm not using it just because it is a cool OO concept. Not that I don't do that in other places in my app - just not here. :-) Dave On Apr 7, 2008, at 3:18 PM, Alexander Spohr wrote: What are the other differences between RawMaterial and ManufacturedPart? Wouldn't it be enough to just flag the RawMaterial ones as such and just have one class for both? atze Am 07.04.2008 um 18:02 schrieb David Avendasora: You know, I was hoping to avoid the whole question if the domain was actually well-modeled or not, but with such dispersions cast on my flawless modeling skills, I must respond! :-P I have 2 types of Parts. One purchased from an outside vendor (RawMaterial), and ones that are manufactured (ManufacturedPart). A ManufacturedPart is made up of any number of component Parts. These component Parts can be _either_ a RawMaterial or another ManufacturedPart. So I have modeled it like this: ManufacturedPart - BillOfMaterial - BOMComponent - Part To make things more complicated each given Manufactured Part can have one or more ways of making it and therefor have multiple BillsOfMaterial. Hence, I have a branching, recursive relationship tree that can be any number of levels deep: ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - Rinse, lather, repeat. Or it can be very simple ManufacturedPart - BillOfMaterial - BOMComponent - RawMaterial What all this comes down to is that billsOfMaterial() does _not_ belong on Part as it does not belong on RawMaterial because a RawMaterial is NOT manufactured by us so it will never have a BillOfMaterial. But there are several places in my code that I want to recursively navigate this tree and I just don't see a right way to do that without some variation of instanceOf (in code or in a fetch), a case statement or adding the method to Part. The simplicity of one simple method returning NSArray.emptyArray wins. Even though it sullies my object graph, it does so in a much less complicated, fragile way. Dave On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote: The real question is whether it makes sense in the domain for a Part to have a bill of materials. The default implementation could be public NSArray billOfMaterials() { return this; } With complex parts overriding it as appropriate. It could just be that the model / design is incomplete and leading David into doing Bad Things in code. Otherwise, (a) the model is just wrong, or (b) David's processing is just wrong. ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/atze%40freeport.de This email sent to [EMAIL PROTECTED] --- Alexander Spohr Freeport Soliversum Fax: +49 40 303 757 99 Web: http://www.freeport.de/ Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d --- ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/mbushkov%40demax.ru This email sent to [EMAIL PROTECTED] -- With best regards, Michael Bushkov ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a re lationship
An alternative way to handle this is to use the Strategy design pattern and just have one Entity ... Part. You would then create a PartBehaviour interface that encapsulates all the things that vary among the various parts. It would give you great flexibility to easily (easier than adding/maintaining another entity to the eomodel inheritance hierarchy IMHO) add other kinds of parts too such as SubassemblyPart, FinishedPart, ConsumablePart, etc. A few years ago I had an inheritance hierarchy that was getting painful (No Fun) to maintain as the system evolved and new requirements had to be implemented . I collapsed the inheritance hierarchy into one Entity and implemented the Strategy design pattern and this has served me very well (even Fun to add features). Switching from an inheritance hierarchy to Strategy design pattern is very easy if you are already using Single table inheritance in fact IIRC, there is no database schema changes required at all. The downside is that *every* Part has *all* attributes ... however the approriate answer is returned when a Part is sent a message so if asked for an attribute that does not make sense for it to have, then it would return null or an empty array in the case of a to-many. The advantage of Strategy design pattern is that each entity can have any subset of the total attributes, even overlapping subsets without a thought or a care as to inheritance layers and overriding logic of subclasses. Of course Stratagy d.p. is not a panacea . sometimes it just works better where inheritance design is becoming No Fun to deal with, which often happens down the road as requirements change/evolve :-) However, if you are under pressure to Just Fix It right now, then Chuck's solution might be easiest and quickest. If you find the inheritance archtecture of Parts is hurting your ability to easily add Real World business logic, then check out the Strategy design pattern (Head First patterns book ... the first one described IIRC) Regards, Kieran On Apr 7, 2008, at 4:03 PM, David Avendasora wrote: Unfortunately, no. There's _lots_ of differences. There are a number of attributes that they share, but they each have completely different business logic for deriving those values, and they each have attributes that are unique to themselves that would make no sense to have on the other. As uncommon as it is to actually need inheritance in the Model, the amount of work I would have to do to not use it would far exceed the amount of work I have to do to use it. Believe me, I'm not using it just because it is a cool OO concept. Not that I don't do that in other places in my app - just not here. :-) Dave On Apr 7, 2008, at 3:18 PM, Alexander Spohr wrote: What are the other differences between RawMaterial and ManufacturedPart? Wouldn’t it be enough to just flag the RawMaterial ones as such and just have one class for both? atze Am 07.04.2008 um 18:02 schrieb David Avendasora: You know, I was hoping to avoid the whole question if the domain was actually well-modeled or not, but with such dispersions cast on my flawless modeling skills, I must respond! :-P I have 2 types of Parts. One purchased from an outside vendor (RawMaterial), and ones that are manufactured (ManufacturedPart). A ManufacturedPart is made up of any number of component Parts. These component Parts can be _either_ a RawMaterial or another ManufacturedPart. So I have modeled it like this: ManufacturedPart - BillOfMaterial - BOMComponent - Part To make things more complicated each given Manufactured Part can have one or more ways of making it and therefor have multiple BillsOfMaterial. Hence, I have a branching, recursive relationship tree that can be any number of levels deep: ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - Rinse, lather, repeat. Or it can be very simple ManufacturedPart - BillOfMaterial - BOMComponent - RawMaterial What all this comes down to is that billsOfMaterial() does _not_ belong on Part as it does not belong on RawMaterial because a RawMaterial is NOT manufactured by us so it will never have a BillOfMaterial. But there are several places in my code that I want to recursively navigate this tree and I just don't see a right way to do that without some variation of instanceOf (in code or in a fetch), a case statement or adding the method to Part. The simplicity of one simple method returning NSArray.emptyArray wins. Even though it sullies my object graph, it does so in a much less complicated, fragile way. Dave On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote: The real question is whether it makes sense in the domain for a Part to have a bill of materials. The default implementation could be public NSArray billOfMaterials() { return this; } With
Re: Best Way® to test for existence of a rela tionship
On Apr 7, 2008, at 10:50 AM, David Avendasora wrote: On Apr 7, 2008, at 1:23 PM, Chuck Hill wrote: I have 2 types of Parts. One purchased from an outside vendor (RawMaterial), and ones that are manufactured (ManufacturedPart). A ManufacturedPart is made up of any number of component Parts. These component Parts can be _either_ a RawMaterial or another ManufacturedPart. Consider it from a different point of view. You have parts that can be composed of sub-parts. There are two sub-classes, 1. SimplePart (aka RawMaterial). This never has any sub-parts. 2. ComplexPart (aka ManufacturedPart). This has one or more sub- parts. In this scenario, Part.subParts() makes sense for all types. I'm not sure how this is much different conceptually than what I have already. It is not. I was just using different names so you might look at it with fresh eyes. I find that tricks like that sometimes help break out of a path of thinking. The problem is that I cannot simplify it that far because there may be 5 or more ways of making a given part depending upon which Manufacturing Line is being used, the time of year, wether or not a piece of equipment on the manufacturing line is broken-down or not, etc. I do have the concept of the default BillOfMaterial for a given Part, but that is controlled by the user setting a flag on the one they want to be default. So, in theory I could have convenience methods that return the subParts of the default BillOfMaterial for the given Part, but in most cases, that is not useful information for my users. I need to know much more before I can say what the subParts are. So I have modeled it like this: ManufacturedPart - BillOfMaterial - BOMComponent - Part What is BOMComponent? Why not just ManufacturedPart - BillOfMaterial - Part Or, in my terminology ComplexPart - ConstructionDescription - Part It's actually even more complicated because there are Steps between the BillOfMaterial and BOMComponents like so: BillOfMaterial - Step - BOMComponent Think of the BillOfMaterial as a recipe to make a specific Part. In Step 1 you will use 5 different BOMComponents. Each Step has attributes such as instructions, tools used, etc. Each BOMComponent has attributes like quantity, unit of measure, etc as well as the part. Yes, that does complicate it. To make things more complicated each given Manufactured Part can have one or more ways of making it and therefor have multiple BillsOfMaterial. Hence, I have a branching, recursive relationship tree that can be any number of levels deep: ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - Rinse, lather, repeat. Or it can be very simple ManufacturedPart - BillOfMaterial - BOMComponent - RawMaterial What all this comes down to is that billsOfMaterial() does _not_ belong on Part as it does not belong on RawMaterial because a RawMaterial is NOT manufactured by us so it will never have a BillOfMaterial. Why are you iterating over Parts calling billOfMaterial()? What is the goal? What exactly are you doing with this information? I have an idea of what you are missing, but I will wait for an answer to this. In this specific example, I'm adding the specified Part to a Manufacturing Schedule and I need to know what subParts (using your terminology) need to be scheduled in addition to the Part that was ordered. The way I find the subParts that need to be scheduled is to open the selected BillOfMaterial for the Part, drill down to the components and step through them to see if they need to be scheduled as well. You mention selected BillOfMaterials. What happens when some of the sub-parts are also Manufactured parts? Does the user manually select their BillOfMaterials too? But there are several places in my code that I want to recursively navigate this tree and I just don't see a right way to do that without some variation of instanceOf (in code or in a fetch), a case statement or adding the method to Part. The simplicity of one simple method returning NSArray.emptyArray wins. Even though it sullies my object graph, it does so in a much less complicated, fragile way. Still seems wrong. Tell me how to do it right. I'm all ears. Well, you went and complicated it. :-) The Visitor pattern suggestion is a good one. It could be your processing, rather than model, that needs a change. Chuck -- 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Best Way® to test for existence of a re lationship
Kieran, Hmm. Your ideas are intriguing to me and I wish to subscribe to your newsletter. I'm going to take a serious look at using this in the future as I can see adding other classes and being able to morph from one behavior to another could be helpful as well. Thanks for the heads up! Dave On Apr 8, 2008, at 9:32 AM, Kieran Kelleher wrote: An alternative way to handle this is to use the Strategy design pattern and just have one Entity ... Part. You would then create a PartBehaviour interface that encapsulates all the things that vary among the various parts. It would give you great flexibility to easily (easier than adding/maintaining another entity to the eomodel inheritance hierarchy IMHO) add other kinds of parts too such as SubassemblyPart, FinishedPart, ConsumablePart, etc. A few years ago I had an inheritance hierarchy that was getting painful (No Fun) to maintain as the system evolved and new requirements had to be implemented . I collapsed the inheritance hierarchy into one Entity and implemented the Strategy design pattern and this has served me very well (even Fun to add features). Switching from an inheritance hierarchy to Strategy design pattern is very easy if you are already using Single table inheritance in fact IIRC, there is no database schema changes required at all. The downside is that *every* Part has *all* attributes ... however the approriate answer is returned when a Part is sent a message so if asked for an attribute that does not make sense for it to have, then it would return null or an empty array in the case of a to-many. The advantage of Strategy design pattern is that each entity can have any subset of the total attributes, even overlapping subsets without a thought or a care as to inheritance layers and overriding logic of subclasses. Of course Stratagy d.p. is not a panacea . sometimes it just works better where inheritance design is becoming No Fun to deal with, which often happens down the road as requirements change/ evolve :-) However, if you are under pressure to Just Fix It right now, then Chuck's solution might be easiest and quickest. If you find the inheritance archtecture of Parts is hurting your ability to easily add Real World business logic, then check out the Strategy design pattern (Head First patterns book ... the first one described IIRC) Regards, Kieran On Apr 7, 2008, at 4:03 PM, David Avendasora wrote: Unfortunately, no. There's _lots_ of differences. There are a number of attributes that they share, but they each have completely different business logic for deriving those values, and they each have attributes that are unique to themselves that would make no sense to have on the other. As uncommon as it is to actually need inheritance in the Model, the amount of work I would have to do to not use it would far exceed the amount of work I have to do to use it. Believe me, I'm not using it just because it is a cool OO concept. Not that I don't do that in other places in my app - just not here. :-) Dave On Apr 7, 2008, at 3:18 PM, Alexander Spohr wrote: What are the other differences between RawMaterial and ManufacturedPart? Wouldn’t it be enough to just flag the RawMaterial ones as such and just have one class for both? atze Am 07.04.2008 um 18:02 schrieb David Avendasora: You know, I was hoping to avoid the whole question if the domain was actually well-modeled or not, but with such dispersions cast on my flawless modeling skills, I must respond! :-P I have 2 types of Parts. One purchased from an outside vendor (RawMaterial), and ones that are manufactured (ManufacturedPart). A ManufacturedPart is made up of any number of component Parts. These component Parts can be _either_ a RawMaterial or another ManufacturedPart. So I have modeled it like this: ManufacturedPart - BillOfMaterial - BOMComponent - Part To make things more complicated each given Manufactured Part can have one or more ways of making it and therefor have multiple BillsOfMaterial. Hence, I have a branching, recursive relationship tree that can be any number of levels deep: ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - BillOfMaterial - BOMComponent - ManufacturedPart - Rinse, lather, repeat. Or it can be very simple ManufacturedPart - BillOfMaterial - BOMComponent - RawMaterial What all this comes down to is that billsOfMaterial() does _not_ belong on Part as it does not belong on RawMaterial because a RawMaterial is NOT manufactured by us so it will never have a BillOfMaterial. But there are several places in my code that I want to recursively navigate this tree and I just don't see a right way to do that without some variation of instanceOf (in code or in a fetch), a case statement or adding the method to Part. The simplicity of one simple method returning
Re: Best Way® to test for existence of a re lationship
However, if you are under pressure to Just Fix It right now, then Chuck's solution might be easiest and quickest. Actually, if you're under pressure to Just Fix It right now ... I would Just Leave It Alone :) It's only wrong because we're grumpy software developers. Your current code gets the job done just fine and it's not that big of a deal. ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Best Way® to test for existence of a relationsh ip
Hi all, This is more of a Java question than a WO-specific one I have an Inheritance structure in my app: Part (abstract Superclass) RawMaterial (subclass of Part) ManufacturedPart (subclass of Part) I have an NSArray of Parts that could be, RawMaterial instances, ManufacturedPart instances, or most likely, a mixture of the two. I want to iterate through the Array and get the contents of the Part.billsOfMaterial() (toMany) relationship. The problem is that while ManufacturedParts have this relationship, RawMaterials do not. Right now, I'm using a try-catch block that catches the exception on RawMaterial.billsOfMaterial() and just ignores it. I could also add a billsOfMaterial() method to the RawMaterial class that simply returns NSArray.emptyArray. Is one way better than the other for any reason? Thanks, Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a relatio nsh ip
Try catch seems expensive to me. Why not just check with if (aPart instanceof ManufacturedPart){ do something with aPart.billsOfMaterial() } At 9:12 AM -0400 4/7/08, David Avendasora wrote: Hi all, This is more of a Java question than a WO-specific one I have an Inheritance structure in my app: Part (abstract Superclass) RawMaterial (subclass of Part) ManufacturedPart (subclass of Part) I have an NSArray of Parts that could be, RawMaterial instances, ManufacturedPart instances, or most likely, a mixture of the two. I want to iterate through the Array and get the contents of the Part.billsOfMaterial() (toMany) relationship. The problem is that while ManufacturedParts have this relationship, RawMaterials do not. Right now, I'm using a try-catch block that catches the exception on RawMaterial.billsOfMaterial() and just ignores it. I could also add a billsOfMaterial() method to the RawMaterial class that simply returns NSArray.emptyArray. Is one way better than the other for any reason? Thanks, Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bobstuart%40mcf.com This email sent to [EMAIL PROTECTED] -- Bob Stuart ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
I'd expect the instanceof check will be much more efficient than catching an exception. From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Chuck On Apr 7, 2008, at 6:34 AM, Bob Stuart wrote: Try catch seems expensive to me. Why not just check with if (aPart instanceof ManufacturedPart){ do something with aPart.billsOfMaterial() } At 9:12 AM -0400 4/7/08, David Avendasora wrote: Hi all, This is more of a Java question than a WO-specific one I have an Inheritance structure in my app: Part (abstract Superclass) RawMaterial (subclass of Part) ManufacturedPart (subclass of Part) I have an NSArray of Parts that could be, RawMaterial instances, ManufacturedPart instances, or most likely, a mixture of the two. I want to iterate through the Array and get the contents of the Part.billsOfMaterial() (toMany) relationship. The problem is that while ManufacturedParts have this relationship, RawMaterials do not. Right now, I'm using a try-catch block that catches the exception on RawMaterial.billsOfMaterial() and just ignores it. I could also add a billsOfMaterial() method to the RawMaterial class that simply returns NSArray.emptyArray. Is one way better than the other for any reason? Thanks, Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bobstuart%40mcf.com This email sent to [EMAIL PROTECTED] -- Bob Stuart ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to [EMAIL PROTECTED] -- 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
I'd expect the instanceof check will be much more efficient than catching an exception. By far ... From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Ew gross ... If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on the convenience of being able to call billsOfMaterial on the entire array, though. ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote: I'd expect the instanceof check will be much more efficient than catching an exception. By far ... From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Ew gross ... By far one of my favorite technical arguments. If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on the convenience of being able to call billsOfMaterial on the entire array, though. Yeah, I'm getting the impression that there's no really ungross OO way to do this. I think this and instanceOf are equally gross because if I add other classes that have a billsOfMaterial() relationship, then I'd have to remember to come here and add it to the list of things instanceOf checks. I think I'll go with adding the billsOfMaterial() method to Part because then I can use this same logic in more places without having to write the instanceOf check every time. Still seems not right, but it's easier. =:-0 Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela t ionsh ip
At 11:20 AM -0400 4/7/08, David Avendasora wrote: On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote: I'd expect the instanceof check will be much more efficient than catching an exception. By far ... From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Ew gross ... By far one of my favorite technical arguments. If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on the convenience of being able to call billsOfMaterial on the entire array, though. Yeah, I'm getting the impression that there's no really ungross OO way to do this. I think this and instanceOf are equally gross because if I add other classes that have a billsOfMaterial() relationship, then I'd have to remember to come here and add it to the list of things instanceOf checks. I think I'll go with adding the billsOfMaterial() method to Part because then I can use this same logic in more places without having to write the instanceOf check every time. If you want to avoid adding the method to Part you could create an interface and have the instance of check that. Then only the classes that have this would implement the interface. That way you only have to change things when you make the new class and only in the class not however many places you might do the instanceof check. Still seems not right, but it's easier. =:-0 Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/bobstuart%40mcf.com This email sent to [EMAIL PROTECTED] -- Bob Stuart ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
On Apr 7, 2008, at 7:36 AM, Mike Schrag wrote: I'd expect the instanceof check will be much more efficient than catching an exception. By far ... From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Ew gross ... Less gross than doing instanceof, hands down. If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on the convenience of being able to call billsOfMaterial on the entire array, though. The real question is whether it makes sense in the domain for a Part to have a bill of materials. The default implementation could be public NSArray billOfMaterials() { return this; } With complex parts overriding it as appropriate. It could just be that the model / design is incomplete and leading David into doing Bad Things in code. Otherwise, (a) the model is just wrong, or (b) David's processing is just wrong. Chuck -- 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
On Apr 7, 2008, at 8:26 AM, Bob Stuart wrote: At 11:20 AM -0400 4/7/08, David Avendasora wrote: On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote: I'd expect the instanceof check will be much more efficient than catching an exception. By far ... From an OO design point of view, I'd add a billsOfMaterial() method to the Part class that simply returns NSArray.emptyArray. ManufacturedPart will then override this to return the correct result for a ManufacturedPart. Ew gross ... By far one of my favorite technical arguments. If it's not an attribute of all Parts, then from an OO design standpoint it shouldn't be on Part. I agree if your argument is based on the convenience of being able to call billsOfMaterial on the entire array, though. Yeah, I'm getting the impression that there's no really ungross OO way to do this. I think this and instanceOf are equally gross because if I add other classes that have a billsOfMaterial() relationship, then I'd have to remember to come here and add it to the list of things instanceOf checks. I think I'll go with adding the billsOfMaterial() method to Part because then I can use this same logic in more places without having to write the instanceOf check every time. If you want to avoid adding the method to Part you could create an interface and have the instance of check that. Then only the classes that have this would implement the interface. That way you only have to change things when you make the new class and only in the class not however many places you might do the instanceof check. Using instanceof on a member of an inheritance hierarchy is a bad code smell. It is the code's ways of telling you that your design is wrong. IMO. Chuck -- 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
Using instanceof on a member of an inheritance hierarchy is a bad code smell. It is the code's ways of telling you that your design is wrong. IMO. I was going to say in my original that instanceof is a code smell, also, actually, but we disagree on the level of ugliness :) You're just cheating -- avoiding an instanceof by mucking up your object model doesn't fix the problem, it just hides it, and makes your object model more confusing at the same time. If there are classes in your hierarchy that don't implement the method, it's not part of the interface. This implies to me that the original design is wrong, unless it really is the case that it's reasonable to ask the other part types their billsOfMaterials, and they just don't have any. But given the original description, I'm assuming the model is right and that's not the case. Bob's suggestion of declaring an additional interface that defines that method definitely seems better, but it doesn't clean up the instanceof check. Even better would be to construct your original fetch to only fetch the objects that this check actually applies to (though as I think about it, this is really just a variation on instanceof -- you push the instanceof, conceptually, into the fetch instead of in Java, but if the model doesn't allow incorrect traversal, that seems better to me). ms ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionsh ip
On Apr 7, 2008, at 8:45 AM, Ken Anderson wrote: Using instanceof on a member of an inheritance hierarchy is a bad code smell. It is the code's ways of telling you that your design is wrong. IMO. Almost as bad as using case statements! (doh!) Case statements are right out! Chuck -- 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Best Way® to test for existence of a rela tionship
Fetch only ManufacturedParts. Don’t use the relationship to Parts (if that’s what you do) to get the NSArray. Either create a relationship to ManufacturedParts or fetch them using a qualifier. Iterating over a mixed NSArray wanting only one special class is bad design. Filter it before you use it for such a task. atze Am 07.04.2008 um 15:12 schrieb David Avendasora: Hi all, This is more of a Java question than a WO-specific one I have an Inheritance structure in my app: Part (abstract Superclass) RawMaterial (subclass of Part) ManufacturedPart (subclass of Part) I have an NSArray of Parts that could be, RawMaterial instances, ManufacturedPart instances, or most likely, a mixture of the two. I want to iterate through the Array and get the contents of the Part.billsOfMaterial() (toMany) relationship. The problem is that while ManufacturedParts have this relationship, RawMaterials do not. Right now, I'm using a try-catch block that catches the exception on RawMaterial.billsOfMaterial() and just ignores it. I could also add a billsOfMaterial() method to the RawMaterial class that simply returns NSArray.emptyArray. Is one way better than the other for any reason? Thanks, Dave ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/atze%40freeport.de This email sent to [EMAIL PROTECTED] --- Alexander Spohr Freeport Soliversum Fax: +49 40 303 757 99 Web: http://www.freeport.de/ Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d --- ___ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]