Many to many relationship... some problem
Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... Some kind help? Thanks Francesco ___ 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: Help me get unstuck with this error: unable to increment snapshot count for object with global ID
Ok, I haven't encountered the unable to increment snapshot error for some time now. However, there is another thing that arised. No com.ods.wo.bids.db.SetasideCode found with globalID: SetasideCode: [id: '6'] er.extensions.eof.ERXDatabaseContextDelegate$ObjectNotAvailableException: No com.ods.wo.bids.db.SetasideCode found with globalID: SetasideCode: [id: '6'] at er.extensions.eof.ERXDatabaseContextDelegate.databaseContextFailedToFetchObject(ERXDatabaseContextDelegate.java:295) 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:585) at com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122) at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:167) at com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4205) at com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172) ..blah blah. I assume this is also a result of violating the EOF commandments Chuck? Or is there an obvious reason why this happens? Thanks, Amiel On Tue, Jul 28, 2009 at 2:44 PM, Chuck Hill ch...@global-village.netwrote: On Jul 27, 2009, at 10:05 PM, Amiel Montecillo wrote: On Tue, Jul 28, 2009 at 11:46 AM, Chuck Hill ch...@global-village.net wrote: On Jul 27, 2009, at 8:10 PM, Amiel Montecillo wrote: 1. Isn't project wonder supposed to handle this for me? I'm using ERXEC.newEditingContext() in the entire app. Is there any locking or unlocking in your code? No, there is no manual call to lock/unlock. I trust wonder to do that for me Its in your quite good practices session before Awesome presentation btw (and this isn't a kiss ass so you will help kind of statement ;j ). :-P Then my best guess is (2), you are making EOF confused somehow. Chuck 2. Most probably, I will dig in deeper 3. Guess not, I'm not using any shared editing contexts. OK. Chuck Thanks for the reply, Amiel On Tue, Jul 28, 2009 at 10:38 AM, Chuck Hill ch...@global-village.net wrote: My first guesses are: 1. Not locking all ECs properly 2. Violating an EOF commandment 3. Using the EOSharedEditingContext incorrectly Chuck On Jul 27, 2009, at 6:31 PM, Amiel Montecillo wrote: Can someone help me out on this error please. Maybe some ideas what's causing this to happen. It is an intermittent error I get which I stuck pondering what is causing it. I have search the lists and found some relevant information but I can't quite put my fingers on it as I am new to WO. I am using WO 5.4.3 with the latest wonder source. and I get this error sometimes. incrementSnapshotCountForGlobalID: er.extensions.eof.ERXDatabase er.extensions.eof.erxdatab...@64d42f -- is unable to increment snapshot count for object with global ID _EOIntegralKeyGlobalID[State (java.lang.Long)72] - no snapshot exists java.lang.IllegalStateException: incrementSnapshotCountForGlobalID: er.extensions.eof.ERXDatabase er.extensions.eof.erxdatab...@64d42f -- is unable to increment snapshot count for object with global ID _EOIntegralKeyGlobalID[State (java.lang.Long)72] - no snapshot exists at com.webobjects.eoaccess.EODatabase.incrementSnapshotCountForGlobalID(EODatabase.java:1062) at er.extensions.eof.ERXDatabase.incrementSnapshotCountForGlobalID(ERXDatabase.java:180) at com.webobjects.eoaccess.EODatabase.setResultCache(EODatabase.java:389) at er.extensions.eof.ERXDatabase.setResultCache(ERXDatabase.java:220) at com.webobjects.eoaccess.EODatabaseContext._populateCacheForFetchSpecificationEditingContext(EODatabaseContext.java:2333) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3042) at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:57) at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1114) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:) at er.extensions.eof.ERXFetchSpecification.fetchObjects(ERXFetchSpecification.java:106) at com.ods.wo.bids.db.State.fetchAllStatesOrdered(State.java:40) at
Re: True war deployment and WebServerResources
Sorry if the reply is posted in another topic, as i've just managed to reactivate my account on this mailing list. So here's what i found : When adding in the Application constructor registerRequestHandler(new WOResourceRequestHandler(), _wr_); WOImage are correctly shown. However ERXStylesheet and ERXImage are not. I guess they are still using an ERXResourceHandler, i didn't take the time to investigate further. Now, how can i produce a zip containing all the web resources (from the app and jar frameworks) with maven ? It's needed when turning deployment mode on in web.xml. Finally everything seems to work quite ok : last WOLips version let me edit wod and eomodeld with the maven project layout, building a true war works... Well the last piece of the puzzle is enabling fast developpement with the build in eclipse. Andrew Lindesay faces the same issue with his message War / Maven / Jar Build – How Does it Work wi th Eclipse's Build Automatically? Thanks for your answers, Alexis Le 1 août 09 à 15:18, Alexis Tual a écrit : Hi list, i'm in the process of mavenizing and deploying a wonder application as a true war. Mavenization worked well and i can package my app as a true war... but when deployed in a servlet container (for example with mvn jetty:run-war) the WebServerResources cannot be found (while they are at the right place inside the jar). I've attached a sample project reproducing the problem with a simple WOImage and ERXStylesheet. Has anyone already encountered this ? I'm not sure it has something to do with wonder. I'll try updgrading to wo 5.4.3 and see if it's better. Thanks for your help ! Alexis TestWO.zip ___ 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: Getting into WebObjects?
On 03/08/2009, at 12:23 PM, Brian Wachter wrote: I have a license of WebObjects (along with 3 WO books) that I purchased several years ago, which has been sitting on the shelf. The reasons being (1) web development is an ancillary part of my current job and I’ve not had any projects that required the technology and (2) because I’ve been reluctant to invest time in what I’m thinking is a limited-userbase/ dead technology. Dead, no; mature, yes; and certainly moving forward. Limited, well somewhat niche, sure, but has a vibrant user-base. I’ve got some dynamic-driven web-based development projects on the horizon, so before I eBay my WO license, I thought that I’d solicit feedback from the WebObjects community as to whether you would recommend WO as a solution for dynamic-driven sites. In general, yes. I don’t know Java, What do you know? it seems EOModeler has been deprecated, Yes, the Apple-tools are no longer used. These days Eclipse/WOLips is the apple/community sponsored toolset. http://wiki.objectstyle.org/confluence/display/WOL/Home and I’m guessing that the books and documentation that I have are antiquated. Perhaps but they'll still be a useful reference though the examples might need translating to the different toolset. Which books? So, I’m thinking that I’d have a steep learning curve. It certainly will be somewhat steep. I’m also wondering what the popular alternatives to WO may be. Will depend somewhat on what you know or are willing to learn. php, Ruby on Rails, Python, Grails (Groovy) etc Or perhaps you just want to use something pre-built with cms functionality like drupal which has lots of plugins for various functionality. Depends on what you're trying to achieve. Thanks in advance for the feedback! with regards, -- Lachlan Deck ___ 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: Many to many relationship... some problem
On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); What particular questions do you have? with regards, -- Lachlan Deck ___ 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: True war deployment and WebServerResources
Thanks Mr Brown, it was indeed the Info.plist that was not correctly filtered... When completed everything shows up : ERXStylesheet, ERXImage... great ! Alexis Le 3 août 09 à 13:50, Alexis Tual a écrit : Hi, Check out: http://wiki.objectstyle.org/confluence/display/WOL/Packaging+WO +Applications+as+true+WAR+with+Maven I just updated it and added a bug panel, which has some known bugs with this, and keep checking the bug panel, there may be additions to it. Mr. G Brown gsbr...@umich.edu ___ 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: Deployment with Embedded Frameworks and Duplicate libraries
Right now JavaMonitor says that wotaskd is not responding. I checked and I am able to get the list of apps by going to the wotaskd app in my browser. wotaskd does not show any errors. I have turned on direct connection to all the instances of the apps and there is one that does not respond. When I look in the log it has the following repeated many times: Aug 03 09:52:58 Bids[2004] (NAKACK.java:1398) ERROR org.jgroups.protocols.pbcast.NAKACK - sender 10.25.100.100:59316 not found in xmit_table Aug 03 09:52:58 Bids[2004] (NAKACK.java:1210) ERROR org.jgroups.protocols.pbcast.NAKACK - range is null I am guessing that this is the problem. Anyone know anything about jgroups? Thanks, Frank ___ 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: Deployment with Embedded Frameworks and Duplicate libraries
Never mind. The other app server wotaskd is not responding according to JavaMonitor now. It does work for me and there is one instance on that box that is not responding. The log for that instance does not show any errors. Frank On Aug 3, 2009, at 10:33 AM, Mr. Frank Cobia wrote: Right now JavaMonitor says that wotaskd is not responding. I checked and I am able to get the list of apps by going to the wotaskd app in my browser. wotaskd does not show any errors. I have turned on direct connection to all the instances of the apps and there is one that does not respond. When I look in the log it has the following repeated many times: Aug 03 09:52:58 Bids[2004] (NAKACK.java:1398) ERROR org.jgroups.protocols.pbcast.NAKACK - sender 10.25.100.100:59316 not found in xmit_table Aug 03 09:52:58 Bids[2004] (NAKACK.java:1210) ERROR org.jgroups.protocols.pbcast.NAKACK - range is null I am guessing that this is the problem. Anyone know anything about jgroups? Thanks, Frank ___ 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/frank.cobia%40f2technology.com This email sent to frank.co...@f2technology.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: Many to many relationship... some problem
On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. So.. I can't set it's pks. What particular questions do you have? with regards, -- Lachlan Deck ___ 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: Many to many relationship... some problem
On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); with regards, -- Lachlan Deck ___ 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: Many to many relationship... some problem
On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. inline: Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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: Many to many relationship... some problem
why do you want to put the quantity in that table ??? leave the relationship alone create a table cart with a relationship to product and a column quantity. then create a relationship cart to order Regards Amedeo On 03/ago/09, at 18:16, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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
Service return limited to 100
I am using WO 5.3 and MySQL 5.0.2. I created a Direct to WebServices project to return rows in a table. It seems to work fine but the number of returned rows is limited to 100. For my project it is important to return all rows (just over 300) via the webservice. Has anyone experienced this issue with D2WS and MySQL 5? Is the limitation from WO or MySQL? Can I get past this by setting a rule? ___ 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: Many to many relationship... some problem
To do what you want you probably want to set those relationships (ordine and prodotto) to be class properties. Just a guess, but it looks like what you're trying to model is a line item; it might make more sense if you think about it that way (i.e. order --- line item --- product) instead of a many-to-many relationship. Fez On Aug 3, 2009, at 11:16 AM, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/listfez%40dakri.com This email sent to list...@dakri.com -- Faizel Dakri ___ 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: Many to many relationship... some problem
On 03/ago/09, at 18:40, Francesco Romano wrote: On 03/ago/09, at 18:29, Amedeo Mantica wrote: why do you want to put the quantity in that table ??? leave the relationship alone create a table cart with a relationship to product and a column quantity. then create a relationship cart to order Regards Amedeo Because I was thinking to save the cart in the cookies.. Should I save the cart of every customer even if they don't place an order? (this is a question.. I don't know how things work..) yes, so you can give customers choice to save cart and finish order later, if the order is not finished within some days you trash the cart Amedeo Francesco On 03/ago/09, at 18:16, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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: Many to many relationship... some problem
On 03/ago/09, at 18:49, Amedeo Mantica wrote: On 03/ago/09, at 18:40, Francesco Romano wrote: On 03/ago/09, at 18:29, Amedeo Mantica wrote: why do you want to put the quantity in that table ??? leave the relationship alone create a table cart with a relationship to product and a column quantity. then create a relationship cart to order Regards Amedeo Because I was thinking to save the cart in the cookies.. Should I save the cart of every customer even if they don't place an order? (this is a question.. I don't know how things work..) yes, so you can give customers choice to save cart and finish order later, if the order is not finished within some days you trash the cart Amedeo Yeah.. I have to change the model a bit :p Btw.. how can I trash the cart automatically? Is it possible with WO? Francesco On 03/ago/09, at 18:16, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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: Many to many relationship... some problem
you can do it via webobjects but is a bit hard is more easy to do a call to a directaction using curl sheduled via launchd or cron Regards Amedeo On 03/ago/09, at 18:51, Francesco Romano wrote: On 03/ago/09, at 18:49, Amedeo Mantica wrote: On 03/ago/09, at 18:40, Francesco Romano wrote: On 03/ago/09, at 18:29, Amedeo Mantica wrote: why do you want to put the quantity in that table ??? leave the relationship alone create a table cart with a relationship to product and a column quantity. then create a relationship cart to order Regards Amedeo Because I was thinking to save the cart in the cookies.. Should I save the cart of every customer even if they don't place an order? (this is a question.. I don't know how things work..) yes, so you can give customers choice to save cart and finish order later, if the order is not finished within some days you trash the cart Amedeo Yeah.. I have to change the model a bit :p Btw.. how can I trash the cart automatically? Is it possible with WO? Francesco On 03/ago/09, at 18:16, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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: Many to many relationship... some problem
Ok.. I'll postpone this,, Now.. for the model I was thinking at this: Order - LineItem(has quantity as attribute) - Product This should solve the to-many problem.. To save the cart... I thought to: Customer - LineItem Or: Customer - Cart - LineItem (Cart entity is useless, but I can add a LastUpdated date ...) What do you think? On 03/ago/09, at 19:02, Amedeo Mantica wrote: you can do it via webobjects but is a bit hard is more easy to do a call to a directaction using curl sheduled via launchd or cron Regards Amedeo On 03/ago/09, at 18:51, Francesco Romano wrote: On 03/ago/09, at 18:49, Amedeo Mantica wrote: On 03/ago/09, at 18:40, Francesco Romano wrote: On 03/ago/09, at 18:29, Amedeo Mantica wrote: why do you want to put the quantity in that table ??? leave the relationship alone create a table cart with a relationship to product and a column quantity. then create a relationship cart to order Regards Amedeo Because I was thinking to save the cart in the cookies.. Should I save the cart of every customer even if they don't place an order? (this is a question.. I don't know how things work..) yes, so you can give customers choice to save cart and finish order later, if the order is not finished within some days you trash the cart Amedeo Yeah.. I have to change the model a bit :p Btw.. how can I trash the cart automatically? Is it possible with WO? Francesco On 03/ago/09, at 18:16, Francesco Romano wrote: On 03/ago/09, at 18:04, Lachlan Deck wrote: On 04/08/2009, at 1:39 AM, Francesco Romano wrote: On 03/ago/09, at 16:10, Lachlan Deck wrote: On 03/08/2009, at 7:21 PM, Francesco Romano wrote: Hi.. I'm having some problem with a many-to-many relationship. I've two entities: Order and Product. They have a many-to-many relationship, and an attribute: quantity. The strange thing is that I don't see the OrderProduct model generated... Check the value of Class Name in the model. It's probably EOGenericRecord. Change it to you.model.OrderProduct You are right.. Now I see the class Well.. to be honest I don't understand how many-to-many works... (In WO.. I know the DB-theory)... OrderProduct orderProduct = (OrderProduct)EOUtilities.createAndInsertInstance(ec, OrderProduct.ENTITY_NAME); // or OrderProduct orderProduct = OrderProduct.createOrderProduct(ec, product, order); orderProduct.setQuantity(quantity); ec.saveChanges(); Little problem.. the only method createOrderProduct has as arguments: editingContext, quantity. 1) Your OrderProduct should (usually) have a compound primary key. (orderID, productID). Both keys shouldn't allow null. Both relationships (order, product) should be manditory. Then regenerate your class. I attach an image.. it's the OrderProduct entity. Picture 1.png So.. I can't set it's pks. 2) This is good. :-) You're dealing with objects now, not database artifacts like pks and foreign keys. You'll be setting object relationships not pk/fk relationships. Simply fetch the product/order _objects_ and orderProduct.setOrder(order); orderProduct.setProduct(product); With pks I meant that I don't have the setProduct and setOrder method (and in the constructor). with regards, -- Lachlan Deck ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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/amedeomailing%40insigno.it This email sent to amedeomail...@insigno.it ___ 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: dispatchRequest not seeing InputStream data from uploadFile request
Yep, I'm using WOnder. Incredible as it may sound, added the 'name' attribute to the WOFileUpload element in wod and worked! This thing is like something you wouldn't think make the difference. This is basically what I did: -took the DA from FileUpload project in Examples folder, where they use the Iterator to upload the file and added the 'name' attribute to the WOFileUpload element, as that DA seeks for the name of the WOFileUpload and ta-dah!.. worked! Thanks! -Carlos From: Chuck Hill [ch...@global-village.net] Sent: Friday, July 31, 2009 2:10 PM To: Carlos Maldonado Cc: webobjects-dev@lists.apple.com Subject: Re: dispatchRequest not seeing InputStream data from uploadFile request On Jul 31, 2009, at 1:49 PM, Carlos Maldonado wrote: Hi, I'm debugging an app and can't find the exact cause of loosing the contents of a file being uploaded. I know WO is capable of uploading files, that's not the issue, even I tested using XCode with WO5.3 in Tiger, Eclipse with WO5.4 in Leopard and finally using Eclipse with WOnder 5.4 in Leopard. All worked with no problems. If I needed to grab the file contents I could do it either in createRequest, dispatchRequest or in the DA method or the action object-method in case I wanted not to use DAs. But then I moved to the non-working app and I can see file contents in createRequest method --I can even save the file-- but as soon as execution gets to dispatchRequest, and though I get a valid object when I issue the call InputStream input = part.formDataInputStream(); --input is valid object-- I don't get any data from the call input.read(buffer, offset, length - offset); or input.available() all I get is a -1 which means there's no data. I don't have an awake method, that I think is the next method in execution after createRequest gets called and before dispatchRequest gets called too. Does anybody had experienced something simliar? or have a clue of what could be causing to loose data?. I checked the encoding for the WOComponent and is set to UTF-8, so defaultFormValueEncoding=UTF-8 and formValueEncoding=UTF-8 are the same. I'm not sure where, but I think the encoding is getting changed. Are you using Wonder in this app? If yes, add this to the Properties file: er.extensions.ERXApplication.DefaultEncoding= UTF-8 Chuck Here's the request that doesn't upload, see if someone can see it different from normal: com.webobjects.appserver.WORequest (com.webobjects.appserver.WORequest httpVersion=HTTP/1.1 headers={accept=[application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5], accept- encoding=[gzip, deflate], accept-language=[en-us], connection=[keep- alive], content-length=[14000], content-type=[multipart/form-data; boundary=WebKitFormBoundaryZ5DtuOIpu8QIP+zn], host=[localhost: 11021], origin=[http://localhost:11021],referer=[http://localhost:11021 /cgi-bin/WebObjects/LSDesktopServer.woa/wa/uploadFile], user- agent=[Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/ 530.19]} content-length=0 cookies=null userInfo={} storePageInBacktrackCache=true ) method=POST uri=/cgi-bin/ WebObjects/LSDesktopServer.woa/wa/uploadPenDataMetrics? filePathToUpload=%2Ftmp %2FHola.javauserToken=090749684221rSHxwWRjQjhN defaultFormValueEncoding=UTF-8 formValueEncodingDetectionEnabled=NO formValueEncoding=UTF-8 formValues={1.0.mimetype = (application/ octet-stream); 1.0.filename = (Hola1.java); 1.0 = ( class com.webobjects.appserver._private.WOInputStreamData (stream com.webobjects.appserver.WOMultipartIterator$WOFormData $_woformdatainputstr...@7689bc of length 0), has NOT been accessed ); } -Carlos ___ 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 ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/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 arch...@mail-archive.com
Re: [SOLVED] dispatchRequest not seeing InputStream data from uploadFile request
Big correction! It wasn't just adding 'name' atrribute to WOFileUpload element... better still, that hasn't to do anything about it. The thing that was broking all was that there was a method call which went through the WOFormData iteratively to extract some partValue and that caused the stream to be closed at the end of the loop which the next read caused to be at the EOF. So rearranging code I was able to not need to went through that loop and the file was read successfully. -Carlos On Jul 31, 2009, at 2:10 PM, Chuck Hill wrote: On Jul 31, 2009, at 1:49 PM, Carlos Maldonado wrote: Hi, I'm debugging an app and can't find the exact cause of loosing the contents of a file being uploaded. I know WO is capable of uploading files, that's not the issue, even I tested using XCode with WO5.3 in Tiger, Eclipse with WO5.4 in Leopard and finally using Eclipse with WOnder 5.4 in Leopard. All worked with no problems. If I needed to grab the file contents I could do it either in createRequest, dispatchRequest or in the DA method or the action object-method in case I wanted not to use DAs. But then I moved to the non-working app and I can see file contents in createRequest method --I can even save the file-- but as soon as execution gets to dispatchRequest, and though I get a valid object when I issue the call InputStream input = part.formDataInputStream(); --input is valid object-- I don't get any data from the call input.read(buffer, offset, length - offset); or input.available() all I get is a -1 which means there's no data. I don't have an awake method, that I think is the next method in execution after createRequest gets called and before dispatchRequest gets called too. Does anybody had experienced something simliar? or have a clue of what could be causing to loose data?. I checked the encoding for the WOComponent and is set to UTF-8, so defaultFormValueEncoding=UTF-8 and formValueEncoding=UTF-8 are the same. I'm not sure where, but I think the encoding is getting changed. Are you using Wonder in this app? If yes, add this to the Properties file: er.extensions.ERXApplication.DefaultEncoding= UTF-8 Chuck Here's the request that doesn't upload, see if someone can see it different from normal: com.webobjects.appserver.WORequest (com.webobjects.appserver.WORequest httpVersion=HTTP/1.1 headers={accept=[application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5], accept- encoding=[gzip, deflate], accept-language=[en-us], connection=[keep- alive], content-length=[14000], content-type=[multipart/form-data; boundary=WebKitFormBoundaryZ5DtuOIpu8QIP+zn], host=[localhost: 11021], origin=[http://localhost:11021],referer=[http://localhost:11021 /cgi-bin/WebObjects/LSDesktopServer.woa/wa/uploadFile], user- agent=[Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/ 530.19]} content-length=0 cookies=null userInfo={} storePageInBacktrackCache=true ) method=POST uri=/cgi-bin/ WebObjects/LSDesktopServer.woa/wa/uploadPenDataMetrics? filePathToUpload=%2Ftmp %2FHola.javauserToken=090749684221rSHxwWRjQjhN defaultFormValueEncoding=UTF-8 formValueEncodingDetectionEnabled=NO formValueEncoding=UTF-8 formValues={1.0.mimetype = (application/ octet-stream); 1.0.filename = (Hola1.java); 1.0 = ( class com.webobjects.appserver._private.WOInputStreamData (stream com.webobjects.appserver.WOMultipartIterator$WOFormData $_woformdatainputstr...@7689bc of length 0), has NOT been accessed ); } -Carlos ___ 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 ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/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 arch...@mail-archive.com
Re: Service return limited to 100
I'm going to guess and say it is the 'fetchLimit' key. It looks like it's set in the framework's d2wmodel at /System/Library/Frameworks/JavaWebServicesGeneration.framework/ Resources/d2w.d2wmodel Ramsey On Aug 3, 2009, at 12:36 PM, Mat Johnson wrote: I am using WO 5.3 and MySQL 5.0.2. I created a Direct to WebServices project to return rows in a table. It seems to work fine but the number of returned rows is limited to 100. For my project it is important to return all rows (just over 300) via the webservice. Has anyone experienced this issue with D2WS and MySQL 5? Is the limitation from WO or MySQL? Can I get past this by setting a rule? ___ 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/rgurley %40mac.com This email sent to rgur...@mac.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
Re: Deployment with Embedded Frameworks and Duplicate libraries
On Aug 3, 2009, at 7:33 AM, Mr. Frank Cobia wrote: Right now JavaMonitor says that wotaskd is not responding. I checked and I am able to get the list of apps by going to the wotaskd app in my browser. wotaskd does not show any errors. Which means that message is incorrect. I have turned on direct connection to all the instances of the apps and there is one that does not respond. Which is why you are getting that message, however misleading the text of the message may be. When I look in the log it has the following repeated many times: Aug 03 09:52:58 Bids[2004] (NAKACK.java:1398) ERROR org.jgroups.protocols.pbcast.NAKACK - sender 10.25.100.100:59316 not found in xmit_table Aug 03 09:52:58 Bids[2004] (NAKACK.java:1210) ERROR org.jgroups.protocols.pbcast.NAKACK - range is null I am guessing that this is the problem. Anyone know anything about jgroups? That may or may not be the problem. That might just be a symptom. It might be irrelevant. Get a thread dump: http://www.gvcsitemaker.com/gvc.webobjects/faqmode=singlerecordID=41413 Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/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 arch...@mail-archive.com
Re: Help me get unstuck with this error: unable to increment snapshot count for object with global ID
On Aug 3, 2009, at 3:12 AM, Amiel Montecillo wrote: Ok, I haven't encountered the unable to increment snapshot error for some time now. However, there is another thing that arised. No com.ods.wo.bids.db.SetasideCode found with globalID: SetasideCode: [id: '6'] er.extensions.eof.ERXDatabaseContextDelegate $ObjectNotAvailableException: No com.ods.wo.bids.db.SetasideCode found with globalID: SetasideCode: [id: '6'] at er .extensions .eof .ERXDatabaseContextDelegate .databaseContextFailedToFetchObject(ERXDatabaseContextDelegate.java: 295) 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:585) at com .webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java: 122) at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java: 223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:167) at com .webobjects .eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4205) at com .webobjects .eoaccess .EOAccessFaultHandler .completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java: 1172) ..blah blah. I assume this is also a result of violating the EOF commandments Chuck? Or is there an obvious reason why this happens? Is SetasideCode cached in memory? I have not used that in WO 5.4.3 so there might be a bug. Or you might just be confusing EOF. Those are the only two reasons that I can think of. Chuck Thanks, Amiel On Tue, Jul 28, 2009 at 2:44 PM, Chuck Hill ch...@global- village.net wrote: On Jul 27, 2009, at 10:05 PM, Amiel Montecillo wrote: On Tue, Jul 28, 2009 at 11:46 AM, Chuck Hill ch...@global- village.net wrote: On Jul 27, 2009, at 8:10 PM, Amiel Montecillo wrote: 1. Isn't project wonder supposed to handle this for me? I'm using ERXEC.newEditingContext() in the entire app. Is there any locking or unlocking in your code? No, there is no manual call to lock/unlock. I trust wonder to do that for me Its in your quite good practices session before Awesome presentation btw (and this isn't a kiss ass so you will help kind of statement ;j ). :-P Then my best guess is (2), you are making EOF confused somehow. Chuck 2. Most probably, I will dig in deeper 3. Guess not, I'm not using any shared editing contexts. OK. Chuck Thanks for the reply, Amiel On Tue, Jul 28, 2009 at 10:38 AM, Chuck Hill ch...@global- village.net wrote: My first guesses are: 1. Not locking all ECs properly 2. Violating an EOF commandment 3. Using the EOSharedEditingContext incorrectly Chuck On Jul 27, 2009, at 6:31 PM, Amiel Montecillo wrote: Can someone help me out on this error please. Maybe some ideas what's causing this to happen. It is an intermittent error I get which I stuck pondering what is causing it. I have search the lists and found some relevant information but I can't quite put my fingers on it as I am new to WO. I am using WO 5.4.3 with the latest wonder source. and I get this error sometimes. incrementSnapshotCountForGlobalID: er.extensions.eof.ERXDatabase er.extensions.eof.erxdatab...@64d42f -- is unable to increment snapshot count for object with global ID _EOIntegralKeyGlobalID[State (java.lang.Long)72] - no snapshot exists java.lang.IllegalStateException: incrementSnapshotCountForGlobalID: er.extensions.eof.ERXDatabase er.extensions.eof.erxdatab...@64d42f -- is unable to increment snapshot count for object with global ID _EOIntegralKeyGlobalID[State (java.lang.Long)72] - no snapshot exists at com .webobjects .eoaccess .EODatabase.incrementSnapshotCountForGlobalID(EODatabase.java:1062) at er .extensions .eof.ERXDatabase.incrementSnapshotCountForGlobalID(ERXDatabase.java: 180) at com.webobjects.eoaccess.EODatabase.setResultCache(EODatabase.java:389) at er.extensions.eof.ERXDatabase.setResultCache(ERXDatabase.java:220) at com .webobjects .eoaccess .EODatabaseContext ._populateCacheForFetchSpecificationEditingContext (EODatabaseContext.java:2333) at com .webobjects .eoaccess .EODatabaseContext ._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java: 3042) at er .extensions .eof .ERXDatabaseContext ._objectsWithFetchSpecificationEditingContext (ERXDatabaseContext.java:57) at com .webobjects .eoaccess .EODatabaseContext .objectsWithFetchSpecification(EODatabaseContext.java:3195) at com .webobjects .eocontrol .EOObjectStoreCoordinator .objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com .webobjects .eocontrol .EOEditingContext .objectsWithFetchSpecification(EOEditingContext.java:4069) at