Re: java.lang.ClassCastException: com.webobjects.eocontrol.EOGenericRecord cannot be cast to com.cariatides.noyau.modele.noyauppersonne.Personne
thanks, i test your answer but i already have the same problem, if i extends ERXGenericRecord, i have java.lang.ClassCastException: com.webobjects.eocontrol.EOGenericRecord cannot be cast to er.extensions.eof.ERXEnterpriseObject and when i extends EOGenericRecords he say my fields is null and don't return a person. have you an other idea? Le 19 avr. 2012 à 01:20, Alexis Tual a écrit : Hi, you should put the whole stacktrace in there. A note, your eos should inherits from EOGenericRecord (or better, ERXGenericRecord, use the templates from Wonder : http://wiki.wocommunity.org/display/WOL/EOGenerator+Templates+and+Additions) Alex 2012/4/19 g.alexandre g.alexan...@symaris.com hi, When i execute my test methods with java, i have : java.lang.ClassCastException: com.webobjects.eocontrol.EOGenericRecord cannot be cast to com.cariatides.noyau.modele.noyauppersonne.Personne But my class personne extends EOCustomObject so i don't know why i have this error. When i inspect listeResultat.objectAtIndex(0), i have a person but i don't cast it. public void test() { NSArray entryList; ERXExtensions.initApp(your.app.Application.class, new String[0]); EOEditingContext editingContext = new EOEditingContext(); entryList = EOUtilities.rawRowsForSQL(editingContext, MaTable, select count(*) from MaTable, null); Personne p = Personne.rechercherParNip(editingContext, 9793l); System.out.println(p); System.out.println(entryList); } public static Personne rechercherParNip(EOEditingContext editingContexte, Long critereNip, boolean refetch) { EOKeyValueQualifier qualifieur = null; EOFetchSpecification specification = null; NSArray listeResultat = null; Personne resultat = null; try { qualifieur = new EOKeyValueQualifier(nip, EOQualifier.QualifierOperatorEqual, critereNip); specification = new EOFetchSpecification(Personne, qualifieur, null); //specification.setRefreshesRefetchedObjects(refetch); listeResultat = editingContexte.objectsWithFetchSpecification(specification); if ((null != listeResultat) (1 == listeResultat.count())) { resultat = (Patient) listeResultat.objectAtIndex(0); } } catch (Exception exception) { System.out.println(Personne.rechercherParNip() : ); System.out.println(exception.toString()); resultat = null; } return resultat; } Best regards G.ALEXANDRE ___ 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/alexis.tual%40gmail.com This email sent to alexis.t...@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
A problem with http request to a webobjects site
Hi! There's a site on WebObjects with a registration and authorization. I write a code that will register automatically on that site(a code on another server, on my site). I want to realize this with a HTTP POST request (PHP). On that WO-site everything is simple: - Main page with an authorization form. (Link to register-form page below) on start this page send back http-header asking browser to set these cookie: 1. wosid=4Q2VQfhC5r2Dcu27brmZH0; 2. woinst=-1; 3. JSESSIONID=6DE82EE80322335D4582FFE33C8F7128; Then i press a link register and go to a register-form page. my browser sends back those cookie: wosid, woinst and JSESSIONID. I fill in a form. Press Register submit button. Page reloads and says me that i've just registered. That's all. A wrote a php code that sends a http GET request to the main page of that WO-site to get those cookie(wosid, woinst and JSESSIONID) A save cookie and send it to a WO-site server, but in the http POST request and with required post data (to the url that pointed in action attribute of the form on the register-form page) I expect that server will return me some success page but it returns You backtracked too far. The application backtracking limit of 30 has been exceeded. What does it mean? Can anyone help me with this? =) Any suggestions? ___ 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: WOUnit
why didn't you include this dependency in WOUnit? and why should i use 1.2 version instead 1.3-SNAPSHOT? 18 апреля 2012 г. 19:29 пользователь Henrique Prange hpra...@gmail.comнаписал: Hi Ron, On 18/04/2012, at 13:06, Henrique Prange wrote: Hi Ron, On 18/04/2012, at 08:06, Ron X wrote: What is the meaning of using @UnderTest? The @UnderTest annotation can be used to create real enterprise objects and insert them into the editing context rule. It is a shorthand for: public class SongTest { ... private Song song; @Before public void setup() { foo = Song.createFoo(ec); } ... } A small fix: public class SongTest { ... private Song song; @Before public void setup() { song = Song.createSong(ec); } ... } Cheers, Henrique ___ 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
Maven
hi does anybody know how set up maven for wonder in right way? mvn clean install i have this error: [INFO] Creating output folders [INFO] Defining WO resources [INFO] Defining WO properties [INFO] Defining WO classpath [INFO] Coping WebServerResources [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 1:15.213s [INFO] Finished at: Thu Apr 19 01:44:56 PDT 2012 [INFO] Final Memory: 9M/81M [INFO] [ERROR] Failed to execute goal org.objectstyle.woproject.maven2:maven-wolifecycle-plugin:2.1:define-woapplication-resources (default-define-woapplication-resources) on project XMobile: Could not open jar ('JavaWebObjects-5.4.3.jar') input stream: invalid entry size (expected 13949 but got 11459 bytes) - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. by the way - how can i build project with maven in build-directory - not in target. i thought maven-wolifecycle-plugin do this automatically and can anybody list all maven goals in this plugin? ___ 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: A problem with http request to a webobjects site
Do you use WODirectAction ? If not, it might be a study point. Jérémy Le 19 avr. 2012 à 08:49, User a écrit : Hi! There's a site on WebObjects with a registration and authorization. I write a code that will register automatically on that site(a code on another server, on my site). I want to realize this with a HTTP POST request (PHP). On that WO-site everything is simple: - Main page with an authorization form. (Link to register-form page below) on start this page send back http-header asking browser to set these cookie: 1. wosid=4Q2VQfhC5r2Dcu27brmZH0; 2. woinst=-1; 3. JSESSIONID=6DE82EE80322335D4582FFE33C8F7128; Then i press a link register and go to a register-form page. my browser sends back those cookie: wosid, woinst and JSESSIONID. I fill in a form. Press Register submit button. Page reloads and says me that i've just registered. That's all. A wrote a php code that sends a http GET request to the main page of that WO-site to get those cookie(wosid, woinst and JSESSIONID) A save cookie and send it to a WO-site server, but in the http POST request and with required post data (to the url that pointed in action attribute of the form on the register-form page) I expect that server will return me some success page but it returns You backtracked too far. The application backtracking limit of 30 has been exceeded. What does it mean? Can anyone help me with this? =) Any suggestions? ___ 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/jeremy.deroyer%40ingencys.net This email sent to jeremy.dero...@ingencys.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
Re: Maven
i start mvn clean org.objectstyle.woproject.maven2:maven-wolifecycle-plugin:2.1:package-woapplication or mvn clean org.objectstyle.woproject.maven2:maven-wolifecycle-plugin:2.1:woapplication build successful but how get .woa folder? there is tar.gz and jar-s... 19 апреля 2012 г. 11:54 пользователь Ron X ron.x.by...@gmail.com написал: hi does anybody know how set up maven for wonder in right way? mvn clean install i have this error: [INFO] Creating output folders [INFO] Defining WO resources [INFO] Defining WO properties [INFO] Defining WO classpath [INFO] Coping WebServerResources [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 1:15.213s [INFO] Finished at: Thu Apr 19 01:44:56 PDT 2012 [INFO] Final Memory: 9M/81M [INFO] [ERROR] Failed to execute goal org.objectstyle.woproject.maven2:maven-wolifecycle-plugin:2.1:define-woapplication-resources (default-define-woapplication-resources) on project XMobile: Could not open jar ('JavaWebObjects-5.4.3.jar') input stream: invalid entry size (expected 13949 but got 11459 bytes) - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. by the way - how can i build project with maven in build-directory - not in target. i thought maven-wolifecycle-plugin do this automatically and can anybody list all maven goals in this plugin? ___ 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: Entity Modeler, attributes default value for migrations
I didn't understand 'edit manually' until I used Chuck's method of adding a User Info entry in Entity Modeler. Then I used TextMate on the plist and understood. Thanks, Ted --- On Wed, 4/18/12, John Huss johnth...@gmail.com wrote: From: John Huss johnth...@gmail.com Subject: Re: Entity Modeler, attributes default value for migrations To: Theodore Petrosky tedp...@yahoo.com, WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Date: Wednesday, April 18, 2012, 4:07 PM You have to add it manually into the userInfo dictionary by editing by model with a text editor. For example, for the ATTRIBUTE called deleted: ... { columnName = scp_deleted; name = deleted; prototypeName = intBoolean; userInfo = {default = 0; }; width = 1; }... On Wed, Apr 18, 2012 at 2:33 PM, Theodore Petrosky tedp...@yahoo.com wrote: When I create an attribute in Entity Modeler, and create the migrations, it does a beautiful job. creativeBriefTable.newFlagBooleanColumn(isfiled, false); and I know I can add a default value here creativeBriefTable.newFlagBooleanColumn(isfiled, false, false); problem is that if I go back and alter the schema and recreate the migration, I must remember to add in the default selector(s). I don't see in EM where I could put in a default value (or I am blind). Is there a place to put in a default value in Entity Modeler so the migrations it creates include the default value? 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/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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
ERRest keys renaming
Hi ERRest/ERXKeyFilter gurus, I know that it is possible to rename entities with : ERXRestNameRegistry.registry().setExternalNameForInternalName(String externalName, String internalName). But, is there a way to rename attributes or relationships external names ? Thanks, Sébastien ___ 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: Entity Modeler, attributes default value for migrations
But here is the gotcha! in Entity Modeler (or hand editing the plist file) you must use userInfo = {default = 0; }; note the zero NOT false!! if you use 'false' or 'true', EM creates the migrations okay, however creating a new object in D2W throws errors: Apr 19 18:05:52 ASBriefsD2W[57541] WARN NSLog - com.webobjects.appserver._private.WOComponentRequestHandler: Exception occurred while handling request: java.lang.NumberFormatException [2012-4-19 18:5:52 EDT] WorkerThread0 java.lang.NumberFormatException at java.math.BigDecimal.init(BigDecimal.java:459) at java.math.BigDecimal.init(BigDecimal.java:728) so the userInfo = {default = 0; }; thank you John for pointing out the zero. Ted --- On Wed, 4/18/12, Chuck Hill ch...@global-village.net wrote: From: Chuck Hill ch...@global-village.net Subject: Re: Entity Modeler, attributes default value for migrations To: John Huss johnth...@gmail.com Cc: Theodore Petrosky tedp...@yahoo.com, WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com Date: Wednesday, April 18, 2012, 5:05 PM Hand edit? Eeew! :-P Select the property and then the User Info tab in the Properties inspector. Click where it says (0 items) and hit Enter. Edit the name and value. Chuck On 2012-04-18, at 1:07 PM, John Huss wrote: You have to add it manually into the userInfo dictionary by editing by model with a text editor. For example, for the ATTRIBUTE called deleted: ... { columnName = scp_deleted; name = deleted; prototypeName = intBoolean; userInfo = {default = 0; }; width = 1; } ... On Wed, Apr 18, 2012 at 2:33 PM, Theodore Petrosky tedp...@yahoo.com wrote: When I create an attribute in Entity Modeler, and create the migrations, it does a beautiful job. creativeBriefTable.newFlagBooleanColumn(isfiled, false); and I know I can add a default value here creativeBriefTable.newFlagBooleanColumn(isfiled, false, false); problem is that if I go back and alter the schema and recreate the migration, I must remember to add in the default selector(s). I don't see in EM where I could put in a default value (or I am blind). Is there a place to put in a default value in Entity Modeler so the migrations it creates include the default value? 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/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: https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/gvc/practical_webobjects ___ 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: WOUnit
On 19/04/2012, at 6:26 PM, Ron X wrote: why didn't you include this dependency in WOUnit? and why should i use 1.2 version instead 1.3-SNAPSHOT? A snapshot release is not stable. It therefore may change should you come back to it tomorrow. Lachlan Deck lachlan.d...@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
Application properties
Hi List, We have been using a table to store the application configuration parameters. In every application that table just have a record and we have a Configuration section in the app to modify those values. In the Application class we have methods to store an updated object with the configuration information. It works fine until we deploy the application and starts more than one instance in the JavaMonitor because if any value of the configuration changes the object in the Application object gets updated but the other instances don't receive any message to reload configuration info. We don't want to consult the data base any time we want a configuration parameter because we use them all over the application, we store number formats, reporter URL, date formats, etc. Is there any way to send a kind of message between different instances of the same application? I am thinking on changing our approach to use XML properties file, but I have the same problem, How to know when the properties file changes to load them in every instance of my application? Any help will be appreciated. Best regards. Miguel Torres ___ 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