Re: D2W/ERModernLook in non D2W app
Well, evidently, I need to start from scratch, because none of these changes made a whit of difference. I still get no d2wcontext, and get the same NPE. I wish I knew what it was that I broke, so this would seem less like black box magic and I had any understanding of it to fix my own issues. C'est la vie, I guess. On Jun 9, 2010, at 7:07 PM, David Holt wrote: Hi Andrew, On 9-Jun-10, at 3:34 PM, akinnie wrote: OK, that all makes sense. :-) I didn't think I needed a home() method as I was putting it in a subcomponent, so I commented it out. homeAction() is just a name. Don't be confused by that. In this case, David arbitrarily made the choice that the homeAction was the customary QueryAll page for the ERModernMoviesDemo. It might just as easily be a list of users, or a search page for bugs, or whatever you want. You just need to call the method from your Admin tab, whatever it is called. For example you might want to call it adminHomePage(). That just doesn't matter. The D2W.factory().defaultPage called in the homeAction is set in the Rules. If you open up the rules for JavaDirectToWeb framework you'll find 0 *true* startupTask = queryAll This is what is being used by defaultPage to render the QueryAll page component. If you prefer a different task to be your beginning task, set your new 'startupTask' at a higher priority in the rules and make sure that you specify a 'startupEntityName' as well (any task other than queryAll acts on an entity). The Factory class in BugTracker gives you all sorts of options for actions that you could call from your navigation scheme (for example you could display a qualified list of entities based on your logged in user). This is where ERXThreadStorage comes in handy because it is accessible from your EOs. I think. I am in school at the moment, so I do have it in front of me. Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 tonight. Thanks to you and Ramsey for all your help. . . not to suggest I won't need more tomorrow. Not a problem. It is my hope that I can be of some help! David ___ 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: wonder maven problem
Hi Laurent, On 10/06/10 06:37, Cros Laurent wrote: [INFO] Installing C:\Apple\wonder\5.4\src\Wonder\Common\pom.xml to C:\Documents and Settings\lcros\.m2\repository\wonder\common\common\4.0.0-SNAPSHOT\common-4.0.0-SNAPSHOT.pom Looks like you are trying to build a very old version of Wonder. I don't think Wonder 4.0.0-SNAPSHOT was completely mavenized. Did you download the source code from trunk? By the way, it is probably easier to proxy the WOCommunity Maven repository in your Nexus instance if you want the latest version of Wonder libraries. 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: wonder maven problem
Henrique, That what I though. So I take the latest wonder source (date of 09/2010) I execute the command : C:\JCOMMOPS\passage-sous-maven\wonder_09_2010mvn -e clean install -P wo54 -Dwoversion=5.4.3 And tried to build it by maven and I got the following errors : [INFO] [compiler:compile] [INFO] Compiling 58 source files to C:\JCOMMOPS\passage-sous-maven\wonder_09_201 0\Frameworks\Core\JavaWOExtensions\target\classes [INFO] [ERROR] FATAL ERROR [INFO] [INFO] loader constraint violation: loader (instance of org/codehaus/classworlds /RealmClassLoader) previously initiated loading for a different type with name org/codehaus/plexus/component/repository/ComponentDescriptor [INFO] [INFO] Trace java.lang.LinkageError: loader constraint violation: loader (instance of org/cod ehaus/classworlds/RealmClassLoader) previously initiated loading for a different type with name org/codehaus/plexus/component/repository/ComponentDescriptor at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL oader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal m.java:255) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader. java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.codehaus.plexus.component.factory.ant.AntScriptInvoker.init(Ant ScriptInvoker.java:63) at org.codehaus.plexus.component.factory.ant.AntComponentFactory.newInst ance(AntComponentFactory.java:20) at org.apache.maven.script.ant.AntMojoComponentFactory.newInstance(AntMo joComponentFactory.java:36) at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De faultPlexusContainer.java:1464) at org.codehaus.plexus.component.manager.AbstractComponentManager.create ComponentInstance(AbstractComponentManager.java:93) at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo mponent(PerLookupComponentManager.java:48) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai ner.java:331) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai ner.java:440) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul tPluginManager.java:609) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:429) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] [INFO] Total time: 12 seconds [INFO] Finished at: Thu Jun 10 15:49:15 CEST 2010 [INFO]
Re: Reboot server, webapp can't launch! SOLVED!
For the record, this has been solved. How? 1. I added a -WOHost parameter to the application, even though there is only one active ip interface (if we don't include: localhost on lo0, gif0.) The below Google info, i.e. changing /System/Library/WebObjects/Adaptors/Apache/apache.conf by changing the WebObjectsConfig line from http://localhost:1085 to http://1.2.3.4:1085 I don't think is necessary, as the adaptor and wotaskd communicate fine using IP6 over localhost. 2. I patched /System/Library/WebObjects/JavaApplications/wotaskd.woa/w otaskd and then copied it to: /System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/ MacOS/wotaskd Toward the end of wotaskd I inserted the following lines: # wait untill things boot all the way up /usr/sbin/ipconfig waitall /bin/sleep 10 # # Launch the application. # Things now reboot correctly. I would guess this is the most important change. The below, http://lists.apple.com/archives/webobjects-deploy/2008/Jun /msg00043.html, also suggests putting the same lines of code in Javamonitor as well, for good measure. I didn't do that, but if reboots cause more problems, I will. On Jun 9, 2010, at 11:42 AM, Chuck Hill wrote: There was a problem. It was starting the WO services before the networking had fully initialized, IIRC. Cliff Tuel posted some wait logic for one of the scripts, but I don't recall what or where or where to find it now. Ah, right. Google. Here: http://lists.apple.com/archives/webobjects-deploy/2008/Jun/msg000 43.html Chuck On Jun 9, 2010, at 8:24 AM, Simon wrote: didn't 10.4 have an issue with starting wo / apache in the wrong order ? try stopping webserver, then stop wo, then start webserver, then start wo. or the other way round, it's been a while since i played with a 10.4 server :-) simon On 8 June 2010 19:42, gsbr...@umich.edu wrote: Hi, When I reboot a 10.4.11 server, wotaskd and monitor? start, but wotaskd can't start my webapp. The symptoms are it seems like it is trying to start, and womonitor shows that it is trying. The app's log file showed it loaded once, and then the log ends. Of course, it does not start, and I have to restart wotaskd, then I can start the app. Now I noticed the plist for womonitor did not have the key Disabled set to false/, but womonitor always seemed to be running. ( I fixed the womonitor plist.) From what Mr. Google showed me, I may need to have a -WOHost parameter. I have 2 ethernet ports; en0, which is not configured, and en1, which is configured. Maybe it tries on en0? Also, the /System/Library/WebObjects/Adaptors/Apache/apache.conf may need to be changed, as per the below info. If /System/Library/WebObjects/Adaptors/Apache/apache.conf is set at the factory default of localhost and one has 2 ip interfaces, how does it know which ip address to use? There is also the option of setting a /Library/WebObjects/Configuration/WOConfig.xml file with the application name, port, host, etc. That may help. Does anybody have any experience in this? Thanks in advance. Google showed me the following: 1/ Update the Adaptor configuration file located in : /System/Library/WebObjects/Adaptors/Apache/apache.conf by changing the WebObjectsConfig line from http://localhost:1085 to http://1.2.3.4:1085 using the real IP of the computer This problem was detected by logging the WOAdaptor comportement. To start the log do : sudo touch /tmp/logWebObjects after that it's possible to look at the WebObjects.log in /tmp/ 2/ In System/Library/LaunchDaemons/ on : com.apple.womonitor.plist and com.apple.wotaskd.plist I have added a new Parameter -WOHost=1.2.3.4 using the same IP than in the apache.conf file 3/ when I created my host in JavaMonitor I've done it with the same IP than above 4/ When I created an Application I've added the -WOHost=1.2.3.4 in the Additional Arguments textarea for the New Instance Defaults for the Application -- 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/simon%40pot wells.co.uk This email sent to si...@potwells.co.uk ___ 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%40glo bal-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
Re: D2W/ERModernLook in non D2W app
Instead of thinking of it as embedding D2W into your app, I think it may help if you look at as embedding your app into D2W. Let me explain that. You say you want to take your existing wrapper and embed the D2W admin stuff into the ajax update container. The thing is, the wrapper is a subcomponent of your Main page. You probably know this already, but I found it really counter-intuitive until I saw this diagram: http://developer.apple.com/legacy/mac/library/documentation/WebObjects/Developing_With_D2W/Architecture/Architecture.html#/ /apple_ref/doc/uid/TP30001015-DontLinkChapterID_2-BAJJHJGE Once I understood that the wrapper is the child, and not the other way around, things started to make more sense to me. Anyway, to load a D2W page into your page wrapper, you either have to embed it in your existing page inside the update container or load a D2W page in place of your Main. (I'm assuming the update container is in your main, and not in your wrapper) If you are new to D2W, just linking off to the D2W admin pages will be easiest. Those admin pages can even reuse your current page wrapper to keep the look of your main site. All you really need to do to accomplish that is to add a wohyperlink on your page that fires an action that returns something like D2W.factory().defaultPage(session()); That puts you on a D2WPage and then it's turtles all the way down (^_^) If you want to use the modern look specifically, that framework loads its css resources a little differently than you may expect, so looking at how it happens in an empty modern app constructed with the modern template should help a lot. You may need to consult the Davids for the particulars there. The wrapper is just an ordinary component though. If you're getting a null pointer, it's because that wrapper component assumed it would always be embedded in a D2W page and that is not the case for you. So, it's just your typical debugging mission. Find where the error is happening, and don't let the lack of a D2W context cause a crash for your non-D2W main component. It could be as simple as if(context().page() instanceof D2WPage) { // D2W dependent code here } You never needed the modern css on your Main page before, so you shouldn't need it now. The other way involves embedding D2W pages into your page using D2WList, D2WInspect, D2WQuery and the like. The bindings on those components are fairly straightforward, but it's going to be more work and probably require a somewhat better understanding of D2W. HTH, Ramsey On Jun 10, 2010, at 9:51 AM, Andrew R. Kinnie wrote: OK, I just redid everything, and got back to exactly the same error. I have essentially no idea at all what to even look at at this point. Andrew On Jun 9, 2010, at 7:07 PM, David Holt wrote: Hi Andrew, On 9-Jun-10, at 3:34 PM, akinnie wrote: OK, that all makes sense. :-) I didn't think I needed a home() method as I was putting it in a subcomponent, so I commented it out. homeAction() is just a name. Don't be confused by that. In this case, David arbitrarily made the choice that the homeAction was the customary QueryAll page for the ERModernMoviesDemo. It might just as easily be a list of users, or a search page for bugs, or whatever you want. You just need to call the method from your Admin tab, whatever it is called. For example you might want to call it adminHomePage(). That just doesn't matter. The D2W.factory().defaultPage called in the homeAction is set in the Rules. If you open up the rules for JavaDirectToWeb framework you'll find 0 *true* startupTask = queryAll This is what is being used by defaultPage to render the QueryAll page component. If you prefer a different task to be your beginning task, set your new 'startupTask' at a higher priority in the rules and make sure that you specify a 'startupEntityName' as well (any task other than queryAll acts on an entity). The Factory class in BugTracker gives you all sorts of options for actions that you could call from your navigation scheme (for example you could display a qualified list of entities based on your logged in user). This is where ERXThreadStorage comes in handy because it is accessible from your EOs. I think. I am in school at the moment, so I do have it in front of me. Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 tonight. Thanks to you and Ramsey for all your help. . . not to suggest I won't need more tomorrow. Not a problem. It is my hope that I can be of some help! David Andrew On Jun 09, 2010, at 05:27 PM, David Holt programming...@mac.com wrote: Hi Andrew, On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote: yeah, I just noticed that. I was still doing it the old (Ajaxy) way. I also noticed that I didn't replicate the MenuHeader (and instead just included an ERXNavigationMenu directly in Admin), so I
Re: D2W/ERModernLook in non D2W app
OK . . . I started typing that in, and realized something I missed . . . I copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the ERModernDefaultSkin d2w.d2wmodel file into the skin. Now it works. Mostly. The tab panel's tabs are not tabs, but rather strings running together. MASSIVE progress. At least enough to prevent me from any immediate need to quit my job and become a tibetan monk. In short (!?!?): I went back and created a new framework (for my skin) I copied the WSR from ERModernDefaultSkin into my new skin framework. I added er.modern.look.skinframework = MySkin to my Properties file in the skin I added the skin to my project. I copied the user.d2wmodel file from ERModernMoviesDemo into my app (modifying it so it displayed my entities instead of movies) I copied the Session from ERModernMoviesDemo into my app (making appropriate changes to the package etc) I copied Application and DirectAction as well (even though my login probably won't use direct action when I get around to using it. Though I might. That's a future problem). I copied the contents of PageWrapper into my own AdminPageWrapper (and changed the rule to have pageWrapperName point to it) - including wod and html I replaced MenuHeader with the ERXNavigationMenu and added the navigationContext method from the MenuHeader class in ERModernMoviesDemo I copied the NavigationMenu.plist from ERModernMoviesDemo into mine, and changed the entities appropriately (as far as I am able to tell). Same problem. While searching for plane ticket prices to tibet, I got this message, and started (again) going through the steps and discovered that I had copied the wrong d2w.d2wmodel file into my skin. Once I copied the one from the default look into my skin, it now WORKS!!!. again, except for the tabs, which work, but do not look like tabs. I assume there is some config issue I am missing there too. So, in light of that, I notice the rules file has rules which contain plural versions of the entities (apparently in the navigationState) instead of singular (which match the actual entity names). I assume my tab issue is there somewhere. I thought I changed it to match it up, but I'm a bit confused by what is simply a label for the tab, and which is supposed to be entity names, and which I need to change. I'll keep plugging. Thanks again (even when this time it was mainly just telling me to step back and look again step by step) Andrew On Jun 10, 2010, at 10:08 AM, David Holt wrote: On 2010-06-10, at 6:51 AM, Andrew R. Kinnie akin...@mac.com wrote: OK, I just redid everything, Can you tell us what steps this means? David ___ 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: D2W/ERModernLook in non D2W app
On Jun 10, 2010, at 10:36 AM, Ramsey Gurley wrote: Instead of thinking of it as embedding D2W into your app, I think it may help if you look at as embedding your app into D2W. Let me explain that. You say you want to take your existing wrapper and embed the D2W admin stuff into the ajax update container. The thing is, the wrapper is a subcomponent of your Main page. You probably know this already, but I found it really counter-intuitive until I saw this diagram: http://developer.apple.com/legacy/mac/library/documentation/WebObjects/Developing_With_D2W/Architecture/Architecture.html#/ /apple_ref/doc/uid/TP30001015-DontLinkChapterID_2-BAJJHJGE Once I understood that the wrapper is the child, and not the other way around, things started to make more sense to me. Anyway, to load a D2W page into your page wrapper, you either have to embed it in your existing page inside the update container or load a D2W page in place of your Main. (I'm assuming the update container is in your main, and not in your wrapper) If you are new to D2W, just linking off to the D2W admin pages will be easiest. Those admin pages can even reuse your current page wrapper to keep the look of your main site. All you really need to do to accomplish that is to add a wohyperlink on your page that fires an action that returns something like D2W.factory().defaultPage(session()); That puts you on a D2WPage and then it's turtles all the way down (^_^) If you want to use the modern look specifically, that framework loads its css resources a little differently than you may expect, so looking at how it happens in an empty modern app constructed with the modern template should help a lot. You may need to consult the Davids for the particulars there. The wrapper is just an ordinary component though. If you're getting a null pointer, it's because that wrapper component assumed it would always be embedded in a D2W page and that is not the case for you. So, it's just your typical debugging mission. Find where the error is happening, and don't let the lack of a D2W context cause a crash for your non-D2W main component. It could be as simple as if(context().page() instanceof D2WPage) { // D2W dependent code here } Note: You could just drop the page wrapper and menu header from the template into your app and link off using D2W.factory().defaultPage(session()); if merging the wrappers into a single wrapper is too much headache. Good luck and keep us posted on your progress (^_^) Ramsey You never needed the modern css on your Main page before, so you shouldn't need it now. The other way involves embedding D2W pages into your page using D2WList, D2WInspect, D2WQuery and the like. The bindings on those components are fairly straightforward, but it's going to be more work and probably require a somewhat better understanding of D2W. HTH, Ramsey On Jun 10, 2010, at 9:51 AM, Andrew R. Kinnie wrote: OK, I just redid everything, and got back to exactly the same error. I have essentially no idea at all what to even look at at this point. Andrew On Jun 9, 2010, at 7:07 PM, David Holt wrote: Hi Andrew, On 9-Jun-10, at 3:34 PM, akinnie wrote: OK, that all makes sense. :-) I didn't think I needed a home() method as I was putting it in a subcomponent, so I commented it out. homeAction() is just a name. Don't be confused by that. In this case, David arbitrarily made the choice that the homeAction was the customary QueryAll page for the ERModernMoviesDemo. It might just as easily be a list of users, or a search page for bugs, or whatever you want. You just need to call the method from your Admin tab, whatever it is called. For example you might want to call it adminHomePage(). That just doesn't matter. The D2W.factory().defaultPage called in the homeAction is set in the Rules. If you open up the rules for JavaDirectToWeb framework you'll find 0 *true* startupTask = queryAll This is what is being used by defaultPage to render the QueryAll page component. If you prefer a different task to be your beginning task, set your new 'startupTask' at a higher priority in the rules and make sure that you specify a 'startupEntityName' as well (any task other than queryAll acts on an entity). The Factory class in BugTracker gives you all sorts of options for actions that you could call from your navigation scheme (for example you could display a qualified list of entities based on your logged in user). This is where ERXThreadStorage comes in handy because it is accessible from your EOs. I think. I am in school at the moment, so I do have it in front of me. Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 tonight. Thanks to you and Ramsey for all your help. . . not to suggest I won't need more tomorrow. Not a problem. It is my hope that I can be of some help! David Andrew
Re: D2W/ERModernLook in non D2W app
On 2010-06-10, at 7:44 AM, Andrew R. Kinnie akin...@mac.com wrote: OK . . . I started typing that in, and realized something I missed . . . I copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the ERModernDefaultSkin d2w.d2wmodel file into the skin. Now it works. Mostly. The tab panel's tabs are not tabs, but rather strings running together. This one is easy ;-) If you edit the localizable strings file you will see that the words needs to be wrapped in span tags. CSS issue. See demo for examples. Also, check the archives of this and the wonder list where David explains what is going on here. David MASSIVE progress. At least enough to prevent me from any immediate need to quit my job and become a tibetan monk. In short (!?!?): I went back and created a new framework (for my skin) I copied the WSR from ERModernDefaultSkin into my new skin framework. I added er.modern.look.skinframework = MySkin to my Properties file in the skin I added the skin to my project. I copied the user.d2wmodel file from ERModernMoviesDemo into my app (modifying it so it displayed my entities instead of movies) I copied the Session from ERModernMoviesDemo into my app (making appropriate changes to the package etc) I copied Application and DirectAction as well (even though my login probably won't use direct action when I get around to using it. Though I might. That's a future problem). I copied the contents of PageWrapper into my own AdminPageWrapper (and changed the rule to have pageWrapperName point to it) - including wod and html I replaced MenuHeader with the ERXNavigationMenu and added the navigationContext method from the MenuHeader class in ERModernMoviesDemo I copied the NavigationMenu.plist from ERModernMoviesDemo into mine, and changed the entities appropriately (as far as I am able to tell). Same problem. While searching for plane ticket prices to tibet, I got this message, and started (again) going through the steps and discovered that I had copied the wrong d2w.d2wmodel file into my skin. Once I copied the one from the default look into my skin, it now WORKS!!!. again, except for the tabs, which work, but do not look like tabs. I assume there is some config issue I am missing there too. So, in light of that, I notice the rules file has rules which contain plural versions of the entities (apparently in the navigationState) instead of singular (which match the actual entity names). I assume my tab issue is there somewhere. I thought I changed it to match it up, but I'm a bit confused by what is simply a label for the tab, and which is supposed to be entity names, and which I need to change. I'll keep plugging. Thanks again (even when this time it was mainly just telling me to step back and look again step by step) Andrew On Jun 10, 2010, at 10:08 AM, David Holt wrote: On 2010-06-10, at 6:51 AM, Andrew R. Kinnie akin...@mac.com wrote: OK, I just redid everything, Can you tell us what steps this means? David ___ 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: D2W/ERModernLook in non D2W app
Yeah, the problem is I saw that, and actually also copied the English.lproj directory (I had forgotten that, did it a while ago) and edited the Localizable.strings { Nav.Entity1s = spanEntity1/span; ... ERD2W.advancedFindButtonLabel = Advanced...; } I also tried it with Entity1 rather than the plural. (basing it one the NavigationMenu.plist. I am not 100% clear on the association between this and the rule file. Anyway, apparently there is also an ERXNavigationManager.localizeDisplayKeys=true that I needed to set in Properties. NOW the tabs appear. WOO HOO! OK, so, to add it to an existing project, you need to: 1. Created a new framework (for your custom version of the default skin) 2. Copy the WSR from ERModernDefaultSkin into the new skin framework. 3. Add er.modern.look.skinframework = MySkin to the skin's Properties file in resources 4. Copy the d2w.d2wmodel file from the default skin into the new skin's resources folder 5. Add the skin to the project. If based on ERModernMoviesDemo: 6. Copy the user.d2wmodel file from ERModernMoviesDemo into the app's resources (modifying it so it displayed the proper entities instead of movies) 7. Copy the Session, DirectAction and Application contents from ERModernMoviesDemo into my app (making appropriate changes to the package etc) 8. Copy the contents of PageWrapper into my own PageWrapper (and changed the rule to have pageWrapperName point to the new wrapper) - including wod and html 9. If you want copy the MenuHeader or I replace the MenuHeader in the wrapper with the ERXNavigationMenu and add the navigationContext method from the MenuHeader class in ERModernMoviesDemo 10. Copy the NavigationMenu.plist from ERModernMoviesDemo into mine, and changed the entities appropriately 11. Copy the English.lproj folder from ERModernMoviesDemo to the new project and edit the Localizable.strings to display the proper information from the NavigationMenu.plist This seems to have worked for me. so far. Thanks to everyone On Jun 10, 2010, at 10:56 AM, David Holt wrote: On 2010-06-10, at 7:44 AM, Andrew R. Kinnie akin...@mac.com wrote: OK . . . I started typing that in, and realized something I missed . . . I copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the ERModernDefaultSkin d2w.d2wmodel file into the skin. Now it works. Mostly. The tab panel's tabs are not tabs, but rather strings running together. This one is easy ;-) If you edit the localizable strings file you will see that the words needs to be wrapped in span tags. CSS issue. See demo for examples. Also, check the archives of this and the wonder list where David explains what is going on here. David ___ 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
summing a column and other math...
I need some help doing 'simple' math with my objects... relationships: client = contract and = project project = contract project = job job = etime a contract has assignedHours eTime has usedHours I am using a displayGroup to show my eTime entries... webobject name = TimeListRep webobject name = RowColorGenericContainer tdwo:WOString value = $theTimeListItem.user.fullNameString //td tdwo:WOString value = $theTimeListItem.amountOfTime numberformat = ##.## //td tdwo:WOString value = $theTimeListItem.workTask.workTaskTitle //td tdwo:WOString value = $theTimeListItem.timeDate dateformat = %m.%d.%Y //td /webobject /webobject TimeListRep : WORepetition { list = timeListDG.displayedObjects; item = theTimeListItem; index = session.index; } I need to sum the second column value = $theTimeListItem.amountOfTime and subtract it from the assignedHours in the contract I can pull the contract from:theContract = timeList.objectAtIndex(0).job().project().contract(); and then get theContract.assignedHours (timeList is the array that feeds the displayGroup) In SQL I would: select 1500 - sum(c_amount_of_time) from t_e_time where c_job_id IN (SELECT id FROM t_job WHERE c_project_id = 16); where 1500 represents the assignedHours from the contract entity.. I know there is a webobjects way... I just can't find it without help. I could: int theAssignedHours = timeList.objectAtIndex(0).job().project().contract().assignedHours(); then the raw SQL to get the sum of eTime used for this contract and subtract I hope I am clear... 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: summing a column and other math...
Hi Ted, you are right, there is a WO way of doing this. Using KVC this should be doing what you want: Integer result = 1500 - (Integer) timeListDG.displayedObjects.valueForKeyPath(@sum.amountOfTime); jw Am 10.06.2010 um 17:16 schrieb Theodore Petrosky: I need some help doing 'simple' math with my objects... relationships: client = contract and = project project = contract project = job job = etime a contract has assignedHours eTime has usedHours I am using a displayGroup to show my eTime entries... webobject name = TimeListRep webobject name = RowColorGenericContainer tdwo:WOString value = $theTimeListItem.user.fullNameString //td tdwo:WOString value = $theTimeListItem.amountOfTime numberformat = ##.## //td tdwo:WOString value = $theTimeListItem.workTask.workTaskTitle //td tdwo:WOString value = $theTimeListItem.timeDate dateformat = %m.%d.%Y //td /webobject /webobject TimeListRep : WORepetition { list = timeListDG.displayedObjects; item = theTimeListItem; index = session.index; } I need to sum the second column value = $theTimeListItem.amountOfTime and subtract it from the assignedHours in the contract I can pull the contract from:theContract = timeList.objectAtIndex(0).job().project().contract(); and then get theContract.assignedHours (timeList is the array that feeds the displayGroup) In SQL I would: select 1500 - sum(c_amount_of_time) from t_e_time where c_job_id IN (SELECT id FROM t_job WHERE c_project_id = 16); where 1500 represents the assignedHours from the contract entity.. I know there is a webobjects way... I just can't find it without help. I could: int theAssignedHours = timeList.objectAtIndex(0).job().project().contract().assignedHours(); then the raw SQL to get the sum of eTime used for this contract and subtract I hope I am clear... Ted 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
[OT] Room reservation at the Gouverneur
Just a quick note for anyone who are going to make their room reservation at the Hotel Gouverneur for WOWODC : if you make your reservation online, the system (sadly, it's a Flash app) says that the event is August 26 to 28, the event is really August 27 to 29. Don't forget that early bird pricing ends on June 21! WOWODC 2010 will have 18 sessions + 3 labs + 2 case studies, covering a lot of topics. -- Pascal Robert prob...@macti.ca WOWODC 2010 : August 27th-29th, Montreal. wowodc.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: wonder maven problem
Hi Laurent, On 10/06/10 12:16, Cros Laurent wrote: HI, I am moving forward, I changed my maven version and it's far better. If you are start using Maven, make sure you have Maven 2.2.1 installed. Downloading: http://maven.wocommunity.org/content/groups/public/com/webobjects/J avaDirectToWeb/5.4.3/JavaDirectToWeb-5.4.3.pom [INFO] Unable to find resource 'com.webobjects:JavaDirectToWeb:pom:5.4.3' in rep ository wocommunity.releases (http://maven.wocommunity.org/content/groups/public ) Downloading: http://mvnrepo.cls.fr:8081/nexus/content/groups/public/com/webobjec ts/JavaDirectToWeb/5.4.3/JavaDirectToWeb-5.4.3.pom [INFO] Unable to find resource 'com.webobjects:JavaDirectToWeb:pom:5.4.3' in rep ository central (http://repo1.maven.org/maven2) [...] It seems that the resources 'com.webobjects:JavaDirectToWeb:pom:5.4.3' is not found in the wocommounity maven repository ! Maven has found the JavaDirectToWeb jar, but it hasn't been able to find the JavaDirectToWeb-5.4.3.pom file. It seems you have some corrupted data into your local repository. How did you import WebObjects libraries into your local repository? BTW, WebObjects libraries are not available in the WOCommunity repository due to Apple license restrictions. 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: summing a column and other math...
this is fantastic... the only change I had to make was: nteger result = 1500 - (Integer)timeListDG.displayedObjects().valueForKeyPath(@sum.amountOfTime); parens after Objects Ted --- On Thu, 6/10/10, Johann Werner j...@oyosys.de wrote: From: Johann Werner j...@oyosys.de Subject: Re: summing a column and other math... To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Thursday, June 10, 2010, 11:28 AM Hi Ted, you are right, there is a WO way of doing this. Using KVC this should be doing what you want: Integer result = 1500 - (Integer)timeListDG.displayedObjects.valueForKeyPath(@sum.amountOfTime); jw Am 10.06.2010 um 17:16 schrieb Theodore Petrosky: I need some help doing 'simple' math with my objects... relationships: client = contract and = project project = contract project = job job = etime a contract has assignedHours eTime has usedHours I am using a displayGroup to show my eTime entries... webobject name = TimeListRep webobject name = RowColorGenericContainer tdwo:WOString value = $theTimeListItem.user.fullNameString //td tdwo:WOString value = $theTimeListItem.amountOfTime numberformat = ##.## //td tdwo:WOString value = $theTimeListItem.workTask.workTaskTitle //td tdwo:WOString value = $theTimeListItem.timeDate dateformat = %m.%d.%Y //td /webobject /webobject TimeListRep : WORepetition { list = timeListDG.displayedObjects; item = theTimeListItem; index = session.index; } I need to sum the second column value = $theTimeListItem.amountOfTime and subtract it from the assignedHours in the contract I can pull the contract from: theContract = timeList.objectAtIndex(0).job().project().contract(); and then get theContract.assignedHours (timeList is the array that feeds the displayGroup) In SQL I would: select 1500 - sum(c_amount_of_time) from t_e_time where c_job_id IN (SELECT id FROM t_job WHERE c_project_id = 16); where 1500 represents the assignedHours from the contract entity.. I know there is a webobjects way... I just can't find it without help. I could: int theAssignedHours = timeList.objectAtIndex(0).job().project().contract().assignedHours(); then the raw SQL to get the sum of eTime used for this contract and subtract I hope I am clear... 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Deployment on Leopard G4
Pardon if the question seem silly, but I'm a bit confused. I do my development on an Intel Mac, but my application is deployed on an old G4 Xserve. Up to now I had Leopard on both, no problems. Now I've installed Snow Leopard on my Intel. I've downloaded Eclipse 3.5, installed it, etc. When I open the project it complains that is cannot find com.webobjects.appserver.WOContext. What am I missing ? Also, when I open the build path it shows Java VM 1.5.0 and states that it's the OS X default, but I thought the default on Snow Leopard was 1.6.0 and the build path doesn't even show it. What am I doing wrong ? -- Valerio Luccio (212) 998-8736 Center for Brain Imaging4 Washington Place, Room 156 New York University New York, NY 10003 In an open world, who needs windows or gates? ___ 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 on Leopard G4
Chuck Hill wrote: Hi Valerio, On Jun 10, 2010, at 11:38 AM, Valerio Luccio wrote: Pardon if the question seem silly, but I'm a bit confused. I do my development on an Intel Mac, but my application is deployed on an old G4 Xserve. Up to now I had Leopard on both, no problems. Now I've installed Snow Leopard on my Intel. I've downloaded Eclipse 3.5, installed it, etc. When I open the project it complains that is cannot find com.webobjects.appserver.WOContext. What am I missing ? Have you installed WebObjects? If so, check the file named wolips.properties found at ~/Library/Application Support/WOLips/wolips.properties Are the paths in it correct? Also, when I open the build path it shows Java VM 1.5.0 and states that it's the OS X default, but I thought the default on Snow Leopard was 1.6.0 and the build path doesn't even show it. Not sure about that, this might be an Eclipse thing. Chuck Thanks Chuck. I seem to have solved my problem by adding all the WObjects library and slowly removing them one by one. It looks as if the organization of the build path GUI has changed and switching from the Eclipse 3.3 project to the 3.5 some got lost ... I'm still confused about the JVM 1.5 thing though ... -- Valerio Luccio (212) 998-8736 Center for Brain Imaging4 Washington Place, Room 156 New York University New York, NY 10003 In an open world, who needs windows or gates? ___ 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: ERXPrefixQualifierTraversal usage example (@daveeed)
On Jun 10, 2010, at 2:37 PM, Mike Schrag wrote: Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. i think you mean the real old kids ;) Damn kids these days! No respect for the elderly. if you hate twitter so much then why do you magically all of a sudden have a twitter account that you, yourself, and nobody else pretending to be you set at https://twitter.com/chillatgvc? Also why does it say in your profile I love Twitter. I think someone's been lying to us. Bastage! And look who I follow! -- 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: Deployment on Leopard G4
Hi Valerio, On Jun 10, 2010, at 11:38 AM, Valerio Luccio wrote: Pardon if the question seem silly, but I'm a bit confused. I do my development on an Intel Mac, but my application is deployed on an old G4 Xserve. Up to now I had Leopard on both, no problems. Now I've installed Snow Leopard on my Intel. I've downloaded Eclipse 3.5, installed it, etc. When I open the project it complains that is cannot find com.webobjects.appserver.WOContext. What am I missing ? Have you installed WebObjects? If so, check the file named wolips.properties found at ~/Library/Application Support/WOLips/wolips.properties Are the paths in it correct? Also, when I open the build path it shows Java VM 1.5.0 and states that it's the OS X default, but I thought the default on Snow Leopard was 1.6.0 and the build path doesn't even show it. Not sure about that, this might be an Eclipse thing. 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: ERXPrefixQualifierTraversal usage example (@daveeed)
Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. i think you mean the real old kids ;) Damn kids these days! No respect for the elderly. if you hate twitter so much then why do you magically all of a sudden have a twitter account that you, yourself, and nobody else pretending to be you set at https://twitter.com/chillatgvc? Also why does it say in your profile I love Twitter. I think someone's been lying to us. 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: Advise on deadlock
Moving this to the correct list. On Jun 10, 2010, at 12:54 PM, Ricardo J. Parada wrote: We have one app that we just turned on concurrent request handling and we seem to get a deadlock. But I'm not sure why or what to do to fix it. :-) This happens logging in to the application. I'm using WO 5.4.3 and Wonder revision 10715. Here's a stack trace of each thread (it looks like the deadlock is between WorkerThread13 and WorkerThread14: No, both of those threads are waiting for a session that other threads have checked out (possibly the same thread). Either that thread is takinga long time or the session did not get checked back in. Do you have any code the Session methods awake, sleep, or terminate? Chuck Jun 10 10:14:34 PatientPortionPricer[2013] FATAL er.extensions.statistics.ERXStatisticsStore - Request is taking too long, possible deadlock: 300294 ms Request Thread Name: ERXStopWatchTimer Java2D Disposer: Thread[Java2D Disposer,10,main]: at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) WorkerThread13: Thread[WorkerThread13,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com .webobjects .appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java: 191) at com .webobjects .appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913) at er .extensions .appserver.ERXApplication.restoreSessionWithID(ERXApplication.java: 2215) at com .mpv .webapp .patientportionpricer .Application.restoreSessionWithID(Application.java:46) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:324) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Unknown Source) Session Timeout Thread: Thread[Session Timeout Thread,5,main]: at java.lang.Thread.sleep(Native Method) at com.webobjects.appserver.WOSessionStore $_SessionTimeoutManager.run(WOSessionStore.java:98) at java.lang.Thread.run(Unknown Source) WorkerThread14: Thread[WorkerThread14,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com .webobjects .appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java: 191) at com .webobjects .appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913) at er .extensions .appserver.ERXApplication.restoreSessionWithID(ERXApplication.java: 2215) at com .mpv .webapp .patientportionpricer .Application.restoreSessionWithID(Application.java:46) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:324) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) Thanks, Ricardo -- 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
Re: ERXPrefixQualifierTraversal usage example (@daveeed)
(In reply to David's tweet - answer too long for twitter! and twitlonger makes the sentences wrap too much) __ David's question: @kierankelleher would you mind showing me an example of how it is used? It sounds like something that could be used with D2W for permissions __ @daveeed For example, in one of my apps, the User entity has a customersQualifier() method that returns a qualifier appropriate to the Role of the user that qualifies the user's access to Customer objects in the system. The Qualifier is constructed differently for customer users, inside sales, sysadmin, graphic design, etc. The qualifier itself is based on Customer attributes and in itself is useful only for fetches against the Customer entity. Now let's say I have Barcoded Coupons on Mailers, and someone is scanning Coupon redemptions into a web form for tracking and reporting of advertizement effectiveness and let's say I want to make sure that the person scanning has access to the customer that is related to those coupons. And in this scenario, let's say the relationship keyPath from Coupon Entity to Customer Entity is like this: coupon - mailer.campaign.program.location.customer So when the coupon ID is scanned in and submitted, I can create a Qualifier for the Coupon based on the ID, and then I need an auxiliary security qualifier to ensure the logged in user has access to the related Customer so I would do sth like these steps: EOQualifier qCoupon = Coupon.XKEY_SERIAL_ID.eq( scannedCouponID ); EOQualifier qCustomer = currentUser.customerQualifier(); // Since qCustomer qualifies Customer entities and we want to qualify the Coupon that we are fetching based on // the user's restricted access to a specific set of Customer EOs... prefix the customer qualifier to make it a coupon qualifier // that restricts the fetch to coupons related to the customers that this user has access to qCustomer = ERXPrefixQualifierTraversal.prefixQualifierWithKey( mailer.campaign.program.location.customer ); EOQualifier qFinal = ERXQ.and( qCoupon, qCustomer ); Coupon c = ( fetch with qualifier 'qFinal' ) I hope that explains the usage of ERXPrefixQualifierTraversal better Regards, Kieran ___ 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: Advise on deadlock
On Jun 10, 2010, at 4:03 PM, Chuck Hill wrote: Moving this to the correct list. Thanks. On Jun 10, 2010, at 12:54 PM, Ricardo J. Parada wrote: We have one app that we just turned on concurrent request handling and we seem to get a deadlock. But I'm not sure why or what to do to fix it. :-) This happens logging in to the application. I'm using WO 5.4.3 and Wonder revision 10715. Here's a stack trace of each thread (it looks like the deadlock is between WorkerThread13 and WorkerThread14: No, both of those threads are waiting for a session that other threads have checked out (possibly the same thread). Either that thread is takinga long time or the session did not get checked back in. When does the session get checked back in? I'm not familiar with that aspect of WO. Do you have any code the Session methods awake, sleep, or terminate? I looked and the code in awake() is just setting a couple of i-vars. It doesn't seem to be doing much. But I'll look more carefully. Chuck Jun 10 10:14:34 PatientPortionPricer[2013] FATAL er.extensions.statistics.ERXStatisticsStore - Request is taking too long, possible deadlock: 300294 ms Request Thread Name: ERXStopWatchTimer Java2D Disposer: Thread[Java2D Disposer,10,main]: at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) WorkerThread13: Thread[WorkerThread13,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:191) at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913) at er.extensions.appserver.ERXApplication.restoreSessionWithID(ERXApplication.java:2215) at com.mpv.webapp.patientportionpricer.Application.restoreSessionWithID(Application.java:46) at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:324) at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369) at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Unknown Source) Session Timeout Thread: Thread[Session Timeout Thread,5,main]: at java.lang.Thread.sleep(Native Method) at com.webobjects.appserver.WOSessionStore$_SessionTimeoutManager.run(WOSessionStore.java:98) at java.lang.Thread.run(Unknown Source) WorkerThread14: Thread[WorkerThread14,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:191) at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913) at er.extensions.appserver.ERXApplication.restoreSessionWithID(ERXApplication.java:2215) at com.mpv.webapp.patientportionpricer.Application.restoreSessionWithID(Application.java:46) at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:324) at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369) at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) Thanks, Ricardo -- 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
Re: Advise on deadlock
On Jun 10, 2010, at 1:31 PM, Ricardo J. Parada wrote: On Jun 10, 2010, at 4:03 PM, Chuck Hill wrote: Moving this to the correct list. Thanks. On Jun 10, 2010, at 12:54 PM, Ricardo J. Parada wrote: We have one app that we just turned on concurrent request handling and we seem to get a deadlock. But I'm not sure why or what to do to fix it. :-) This happens logging in to the application. I'm using WO 5.4.3 and Wonder revision 10715. Here's a stack trace of each thread (it looks like the deadlock is between WorkerThread13 and WorkerThread14: No, both of those threads are waiting for a session that other threads have checked out (possibly the same thread). Either that thread is takinga long time or the session did not get checked back in. When does the session get checked back in? I'm not familiar with that aspect of WO. At the end of the Request - Response loop, before the response is returned to the browser. Do you have any code the Session methods awake, sleep, or terminate? I looked and the code in awake() is just setting a couple of i- vars. It doesn't seem to be doing much. But I'll look more carefully. Chuck Jun 10 10:14:34 PatientPortionPricer[2013] FATAL er.extensions.statistics.ERXStatisticsStore - Request is taking too long, possible deadlock: 300294 ms Request Thread Name: ERXStopWatchTimer Java2D Disposer: Thread[Java2D Disposer,10,main]: at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) WorkerThread13: Thread[WorkerThread13,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com .webobjects .appserver .WOSessionStore.checkOutSessionWithID(WOSessionStore.java:191) at com .webobjects .appserver.WOApplication.restoreSessionWithID(WOApplication.java: 1913) at er .extensions .appserver.ERXApplication.restoreSessionWithID(ERXApplication.java: 2215) at com .mpv .webapp .patientportionpricer .Application.restoreSessionWithID(Application.java:46) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java: 324) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Unknown Source) Session Timeout Thread: Thread[Session Timeout Thread,5,main]: at java.lang.Thread.sleep(Native Method) at com.webobjects.appserver.WOSessionStore $_SessionTimeoutManager.run(WOSessionStore.java:98) at java.lang.Thread.run(Unknown Source) WorkerThread14: Thread[WorkerThread14,5,main]: at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com .webobjects .appserver .WOSessionStore.checkOutSessionWithID(WOSessionStore.java:191) at com .webobjects .appserver.WOApplication.restoreSessionWithID(WOApplication.java: 1913) at er .extensions .appserver.ERXApplication.restoreSessionWithID(ERXApplication.java: 2215) at com .mpv .webapp .patientportionpricer .Application.restoreSessionWithID(Application.java:46) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java: 324) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:445) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1920) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1885) Thanks, Ricardo -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for
Re: ERXPrefixQualifierTraversal usage example (@daveeed)
Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. i think you mean the real old kids ;) Damn kids these days! No respect for the elderly. if you hate twitter so much then why do you magically all of a sudden have a twitter account that you, yourself, and nobody else pretending to be you set at https://twitter.com/chillatgvc? Also why does it say in your profile I love Twitter. I think someone's been lying to us. Bastage! And look who I follow! I just assumed that's because you were so interested in my tweets. I know how much you love twitter, so it's an honor to be the only person you currently follow. 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: ERXPrefixQualifierTraversal usage example (@daveeed)
On Jun 10, 2010, at 2:09 PM, Kieran Kelleher wrote: On Jun 10, 2010, at 4:57 PM, Chuck Hill wrote: On Jun 10, 2010, at 1:48 PM, Kieran Kelleher wrote: (In reply to David's tweet - answer too long for twitter! and twitlonger makes the sentences wrap too much) __ David's question: @kierankelleher would you mind showing me an example of how it is used? It sounds like something that could be used with D2W for permissions __ @daveeed For example, in one of my apps, the User entity has a customersQualifier() method that returns a qualifier appropriate to the Role of the user that qualifies the user's access to Customer objects in the system. The Qualifier is constructed differently for customer users, inside sales, sysadmin, graphic design, etc. The qualifier itself is based on Customer attributes and in itself is useful only for fetches against the Customer entity. Now let's say I have Barcoded Coupons on Mailers, and someone is scanning Coupon redemptions into a web form for tracking and reporting of advertizement effectiveness and let's say I want to make sure that the person scanning has access to the customer that is related to those coupons. And in this scenario, let's say the relationship keyPath from Coupon Entity to Customer Entity is like this: coupon - mailer.campaign.program.location.customer So when the coupon ID is scanned in and submitted, I can create a Qualifier for the Coupon based on the ID, and then I need an auxiliary security qualifier to ensure the logged in user has access to the related Customer so I would do sth like these steps: EOQualifier qCoupon = Coupon.XKEY_SERIAL_ID.eq( scannedCouponID ); EOQualifier qCustomer = currentUser.customerQualifier(); // Since qCustomer qualifies Customer entities and we want to qualify the Coupon that we are fetching based on // the user's restricted access to a specific set of Customer EOs... prefix the customer qualifier to make it a coupon qualifier // that restricts the fetch to coupons related to the customers that this user has access to qCustomer = ERXPrefixQualifierTraversal .prefixQualifierWithKey ( mailer.campaign.program.location.customer ); qCustomer = ERXPrefixQualifierTraversal.prefixQualifierWithKey(qCustomer, mailer.campaign.program.location.customer ); you mean? Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. :-P Chuck EOQualifier qFinal = ERXQ.and( qCoupon, qCustomer ); Coupon c = ( fetch with qualifier 'qFinal' ) I hope that explains the usage of ERXPrefixQualifierTraversal better Regards, Kieran ___ 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 -- 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: ERXPrefixQualifierTraversal usage example (@daveeed)
On Jun 10, 2010, at 1:48 PM, Kieran Kelleher wrote: (In reply to David's tweet - answer too long for twitter! and twitlonger makes the sentences wrap too much) __ David's question: @kierankelleher would you mind showing me an example of how it is used? It sounds like something that could be used with D2W for permissions __ @daveeed For example, in one of my apps, the User entity has a customersQualifier() method that returns a qualifier appropriate to the Role of the user that qualifies the user's access to Customer objects in the system. The Qualifier is constructed differently for customer users, inside sales, sysadmin, graphic design, etc. The qualifier itself is based on Customer attributes and in itself is useful only for fetches against the Customer entity. Now let's say I have Barcoded Coupons on Mailers, and someone is scanning Coupon redemptions into a web form for tracking and reporting of advertizement effectiveness and let's say I want to make sure that the person scanning has access to the customer that is related to those coupons. And in this scenario, let's say the relationship keyPath from Coupon Entity to Customer Entity is like this: coupon - mailer.campaign.program.location.customer So when the coupon ID is scanned in and submitted, I can create a Qualifier for the Coupon based on the ID, and then I need an auxiliary security qualifier to ensure the logged in user has access to the related Customer so I would do sth like these steps: EOQualifier qCoupon = Coupon.XKEY_SERIAL_ID.eq( scannedCouponID ); EOQualifier qCustomer = currentUser.customerQualifier(); // Since qCustomer qualifies Customer entities and we want to qualify the Coupon that we are fetching based on // the user's restricted access to a specific set of Customer EOs... prefix the customer qualifier to make it a coupon qualifier // that restricts the fetch to coupons related to the customers that this user has access to qCustomer = ERXPrefixQualifierTraversal .prefixQualifierWithKey ( mailer.campaign.program.location.customer ); qCustomer = ERXPrefixQualifierTraversal.prefixQualifierWithKey(qCustomer, mailer.campaign.program.location.customer ); you mean? EOQualifier qFinal = ERXQ.and( qCoupon, qCustomer ); Coupon c = ( fetch with qualifier 'qFinal' ) I hope that explains the usage of ERXPrefixQualifierTraversal better Regards, Kieran ___ 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: ERXPrefixQualifierTraversal usage example (@daveeed)
On Jun 10, 2010, at 2:25 PM, Mike Schrag wrote: Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. i think you mean the real old kids ;) Damn kids these days! No respect for the elderly. -- 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: ERXPrefixQualifierTraversal usage example (@daveeed)
On Jun 10, 2010, at 2:43 PM, Mike Schrag wrote: Exactly :) This was typed into email - not Eclipse! Thnks for spotting that Chuck. (BTW Chuck, you are missing out on the brief Wo discussions on the Twitter Wo group) The real cool kids don't twitter. i think you mean the real old kids ;) Damn kids these days! No respect for the elderly. if you hate twitter so much then why do you magically all of a sudden have a twitter account that you, yourself, and nobody else pretending to be you set at https://twitter.com/chillatgvc? Also why does it say in your profile I love Twitter. I think someone's been lying to us. Bastage! And look who I follow! I just assumed that's because you were so interested in my tweets. I know how much you love twitter, so it's an honor to be the only person you currently follow. lol -- 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