Re: fetchLimit don't affect SQL fetching limit?
I assumed that ( How can I force LIMIT to SQL statement in MySQL? 2012/6/26 Kieran Kelleher kelleh...@gmail.com: It depends on the database plugin you are using. Some plugins take the fetchSpec fetchLimit and incorporate it into the SQL statement in the plugin's EOSQLExpression subclass. The default behaviour of EOF is to limit in memory after the fetch. On Jun 26, 2012, at 10:23 AM, Gennady Kushnir wrote: Hello all! I am fetching from a table that has lots of records. So I decided to fs.setFetchLimit(10) on my EOFetchSpecification, but nevertheless when I perform ec.objectsWithFetchSpecification(fs) I get JavaOutOfMemoryError. It seems to me that fetchLimit does not actually convert to a LIMIT clause in a SELECT statement in underlaying SQL. So the actual limitation is made in memory after fetch. Is it a conventional behavior or it is me doing something wrong? Gennady ___ 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/kelleherk%40gmail.com This email sent to kelleh...@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
fetchLimit don't affect SQL fetching limit?
Hello all! I am fetching from a table that has lots of records. So I decided to fs.setFetchLimit(10) on my EOFetchSpecification, but nevertheless when I perform ec.objectsWithFetchSpecification(fs) I get JavaOutOfMemoryError. It seems to me that fetchLimit does not actually convert to a LIMIT clause in a SELECT statement in underlaying SQL. So the actual limitation is made in memory after fetch. Is it a conventional behavior or it is me doing something wrong? Gennady ___ 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: RHEL 6 High memory usage
I think it is because Mac OS is smarter using physical memory and virtual memory. I always have much greater memory usage on linux than on mac for the same WO app... 2012/6/23 Pascal Robert prob...@macti.ca: Le 2012-06-22 à 13:00, Ron Lift a écrit : I want to thank everyone for the wiki on Deploying on linux at http://wiki.wocommunity.org/display/WO/Deploying+on+Linux It has been a great help. I am running into a memory issue that puzzles me and was wondering if anyone has some insight. I have my application deployed on RHEL6, 64 bit, Java 1.6 .33 running on VMware. When I look at the memory usage after the server is rebooted, no users have accessed the application, each instance is using @ 700meg. The strange thing is before I had the operations department build the server, I created a CentOS 6.2 64 bit on my MBP laptop to test. I can take the same application, deploy it and the memory usage is @ 110 meg. I then deployed the app on our OSX server, 110 meg. Any ideas what could be different or what I could look at? The difference might be in the version (client vs server, 32 bit vs 64 bit) I assume you have a 64 bit JVM everywhere? Same JVM version everywhere? You can check if you are running the JVM as a server by calling java version: $ java -version java version 1.6.0_33 Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720) Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode) But still, a 590 MB difference is huge. If you enable JMX, what is the real usage of the heap space? Here is some info Launching JavaMonitor.woa ... java -DWORootDirectory=/opt -DWOLocalRootDirectory=/opt/Local -DWOUserDirectory=/ -DWOEnvClassPath= -DWOApplicationClass=com.webobjects.monitor.application.Application -DWOPlatform=UNIX -Dcom.webobjects.pid=5058 -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap -WOPort Launching wotaskd.woa ... java -DWORootDirectory=/opt -DWOLocalRootDirectory=/opt/Local -DWOUserDirectory=/ -DWOEnvClassPath= -DWOApplicationClass=com.webobjects.monitor.wotaskd.Application -DWOPlatform=UNIX -Dcom.webobjects.pid=5055 -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap -WOPort 1085 Loading /opt/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/Contents/UNIX/UNIXClassPath.txt Loading /opt/Local/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/UNIX/UNIXClassPath.txt Launching CoopApp.woa ... java -DWORootDirectory= -DWOLocalRootDirectory=/Local -DWOUserDirectory=/opt/Library/WebObjects/Applications/CoopApp.woa -DWOEnvClassPath= -DWOApplicationClass=Application -DWOPlatform=UNIX -Dcom.webobjects.pid=5900 -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap -WOFrameworksBaseURL /WebObjects/CoopApp.woa/Frameworks Loading /opt/Library/WebObjects/Applications/CoopApp.woa/Contents/UNIX/UNIXClassPath.txt ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: Concurrent request handling
Hello again. I did turn on concurrent request handling. And now I have some issue with ec locking. I have subclassed EOEditingContext and this subclass posts alerts to the log when a thread attempts to lock ec that was already locked with another thread. And now I have a log full of such messages. I thought it was me to somehow make a mess to locking. But those log messages contain stack traces. And they show that ec was locked by MultiECLockManager on Session.awake() as it should have. And that the thread is trying to lock ec when doing ec.saveChanges() which action could not happen anywhere outside RRloop. How could that be that session is awaken by one thread and action is invoked by another within the same RRloop? Interesting thing is that users don't complain about deadlocks in App. Also I can see in log that they continue working (in the same session) after such issues. So I assume those issues don't cause deadlocks. However users do complain that the App is running slow sometimes. Maybe that is because of such local locks? Gennady Kushnir 2011/3/10 Chuck Hill ch...@global-village.net: On Mar 10, 2011, at 1:22 AM, Gennady Kushnir wrote: Hello all ! I am wondering whether to turn on concurrent request handling on my deployment or not. I always have this on. What are potential drawbacks of this? I assume there should be some. Why would it be off by default otherwise? I could not find anything interesting on this in documentation. WebObjects has several defaults that are not what most people would want. I think these defaults were set to preserve existing behavior when new features were added. Unless you are sharing unlocked global writable data (from static ivars or Application), there is no reason to NOT have this on. If you are sharing unlocked global writable data, then you are Bad Person and should fix this! And another question: would concurrent request handling save me from global application deadlocks when one single request locks on exception? Maybe. It depends on why that session/request is deadlocking. I would focus on fixing that. 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
Time profiling
Hello list. I have noticed that my app is becoming slow. Are there any methods to analyze it's activity and find performance bottlenecks? I did use memory profiling and decided to extend available memory for my app. It did help me with OutOfMemoryError's and with too frequent and long fullGC events. But users are still complaining. And I do see myself that sometimes there is a irritating few seconds lag after clicking. How could I find out which methods are causing the lag so that I know what I should optimize? -- С уважением, Геннадий Кушнир ___ 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: wotaskd fails with java.net.UnknownHostException
2011/4/14 Chuck Hill ch...@global-village.net: What is the error message? [2011-4-17 15:39:11 MSD] main WebObjects version = 5.4.3 [2011-4-17 15:39:11 MSD] main WOLocalRootDirectory set to non-default: /opt/apple/Local [2011-4-17 15:39:11 MSD] main Failed to parse /opt/apple/Local/Library/WebObjects/Configuration/SiteConfig.xml. Backing up original SiteConfig and continuing as if empty. [2011-4-17 15:39:11 MSD] main Multicast Response Disabled [2011-4-17 15:39:11 MSD] Thread-1 Created UDP socket; listening for requests... [2011-4-17 15:39:11 MSD] main The URL for webserver connect is: I am quite sure SiteConfig is OK. It is the same one used on many deployments without WOHost setting before and it also parses fine on this deployment when -WOHost is set to localhost. On Apr 13, 2011, at 10:04 PM, Gennady Kushnir wrote: If I set any host other than localhost a get an error parsing SiteConfig.xml Do I have to reenter everything manually instead of using prepared SiteConfig? 2011/4/13 Chuck Hill ch...@global-village.net: Then instead of localhost, use the canonical name of the machine. This needs to be the reverse lookup of the machine's IP address. They must resolve correctly between each other. Then use the same WOHost on your apps. Chuck On Apr 13, 2011, at 11:55 AM, Gennady Kushnir wrote: Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Thank you Chuck. This option did help to run wotaskd. But now I can't use it with Monitor. If I set both of them to localhost, then I can't access Web-interface from outside. If I set WOHost to IP then it fails to parse SiteConfig.xml It drives me crazy (( 2011/4/9 Chuck Hill ch...@global-village.net: Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Chuck On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote: Hello list. I was asked to help setting up deployment on Linux system. It is not my first linux deployment, so I do know main steps and some possible errors. But this time it is something new for me. I can not even start wotaskd. When running from terminal it fails with [2011-4-9 10:46:41 MSD] main A fatal exception occurred: WOApplication: Cannot be initialized. [2011-4-9 10:46:41 MSD] main com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:WOApplication: Cannot be initialized. at com.webobjects.appserver.WOApplication.init(WOApplication.java:918) at Application.init(Application.java:112) . Caused by: java.lang.reflect.InvocationTargetException . at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614) at com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316) at com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386) at com.webobjects.appserver.WOApplication.init(WOApplication.java:802) . Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru: NET-DIST.school19.xeno.ru at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93) ... 23 more I have explored all WO configuration files I could remember , but I did not find aforementioned hostname there. Where did wotaskd get that hostname? Why does it need one? And is it possible to override in somewhere? Gennady Kushnir ___ 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 -- 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: wotaskd fails with java.net.UnknownHostException
Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Thank you Chuck. This option did help to run wotaskd. But now I can't use it with Monitor. If I set both of them to localhost, then I can't access Web-interface from outside. If I set WOHost to IP then it fails to parse SiteConfig.xml It drives me crazy (( 2011/4/9 Chuck Hill ch...@global-village.net: Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Chuck On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote: Hello list. I was asked to help setting up deployment on Linux system. It is not my first linux deployment, so I do know main steps and some possible errors. But this time it is something new for me. I can not even start wotaskd. When running from terminal it fails with [2011-4-9 10:46:41 MSD] main A fatal exception occurred: WOApplication: Cannot be initialized. [2011-4-9 10:46:41 MSD] main com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:WOApplication: Cannot be initialized. at com.webobjects.appserver.WOApplication.init(WOApplication.java:918) at Application.init(Application.java:112) . Caused by: java.lang.reflect.InvocationTargetException . at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614) at com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316) at com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386) at com.webobjects.appserver.WOApplication.init(WOApplication.java:802) . Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru: NET-DIST.school19.xeno.ru at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93) ... 23 more I have explored all WO configuration files I could remember , but I did not find aforementioned hostname there. Where did wotaskd get that hostname? Why does it need one? And is it possible to override in somewhere? Gennady Kushnir ___ 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: wotaskd fails with java.net.UnknownHostException
If I set any host other than localhost a get an error parsing SiteConfig.xml Do I have to reenter everything manually instead of using prepared SiteConfig? 2011/4/13 Chuck Hill ch...@global-village.net: Then instead of localhost, use the canonical name of the machine. This needs to be the reverse lookup of the machine's IP address. They must resolve correctly between each other. Then use the same WOHost on your apps. Chuck On Apr 13, 2011, at 11:55 AM, Gennady Kushnir wrote: Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Thank you Chuck. This option did help to run wotaskd. But now I can't use it with Monitor. If I set both of them to localhost, then I can't access Web-interface from outside. If I set WOHost to IP then it fails to parse SiteConfig.xml It drives me crazy (( 2011/4/9 Chuck Hill ch...@global-village.net: Adding -DWOHost=localhost (or the cannonical name of that machine) to the launch args. Chuck On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote: Hello list. I was asked to help setting up deployment on Linux system. It is not my first linux deployment, so I do know main steps and some possible errors. But this time it is something new for me. I can not even start wotaskd. When running from terminal it fails with [2011-4-9 10:46:41 MSD] main A fatal exception occurred: WOApplication: Cannot be initialized. [2011-4-9 10:46:41 MSD] main com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:WOApplication: Cannot be initialized. at com.webobjects.appserver.WOApplication.init(WOApplication.java:918) at Application.init(Application.java:112) . Caused by: java.lang.reflect.InvocationTargetException . at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614) at com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316) at com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386) at com.webobjects.appserver.WOApplication.init(WOApplication.java:802) . Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru: NET-DIST.school19.xeno.ru at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93) ... 23 more I have explored all WO configuration files I could remember , but I did not find aforementioned hostname there. Where did wotaskd get that hostname? Why does it need one? And is it possible to override in somewhere? Gennady Kushnir ___ 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
wotaskd fails with java.net.UnknownHostException
Hello list. I was asked to help setting up deployment on Linux system. It is not my first linux deployment, so I do know main steps and some possible errors. But this time it is something new for me. I can not even start wotaskd. When running from terminal it fails with [2011-4-9 10:46:41 MSD] main A fatal exception occurred: WOApplication: Cannot be initialized. [2011-4-9 10:46:41 MSD] main com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:WOApplication: Cannot be initialized. at com.webobjects.appserver.WOApplication.init(WOApplication.java:918) at Application.init(Application.java:112) . Caused by: java.lang.reflect.InvocationTargetException . at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614) at com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316) at com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386) at com.webobjects.appserver.WOApplication.init(WOApplication.java:802) . Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru: NET-DIST.school19.xeno.ru at java.net.InetAddress.getLocalHost(InetAddress.java:1354) at com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93) ... 23 more I have explored all WO configuration files I could remember , but I did not find aforementioned hostname there. Where did wotaskd get that hostname? Why does it need one? And is it possible to override in somewhere? Gennady Kushnir ___ 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: Scheduled Actions
I use java.util.Timer in my app. It works nice for me sending weekly emails and performing some other actions 2011/3/29 Tim Worman li...@thetimmy.com: I have used the cron/script approach for a long time and it works quite well. I am starting to transition my apps to use quartz. There's a chance my apps could have multiple deployments and I felt it was necessary to de-couple the app from any outside scripting and schedulers that would also have to be mimic'ed and re-deployed. Tim Worman UCLA GSEIS On Mar 28, 2011, at 8:10 PM, Matthew Ness wrote: How would I handle scheduled actions with WebObjects. Cron or some other approach? I'd like to have my application run a daily process to check a remote client's membership status and update my application's membership status. Thanks, Ken You could write a simple script which invokes curl, calling a DA in your application, and schedule the script as a cron job. You may want to include a level of security/authentication in the call. -- Matt. http://logicsquad.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: http://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com This email sent to li...@thetimmy.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Memory control
64M seems small to me for a Java app. I did not do any memory regulations myself. It is just default on my absolutely standard deployment system for WO (Xserve G4 , 2GB, MacOS X 10.5, Java 1.5.0_24) I found this 64M doing ps ax | grep java It lists all WO apps like this: /usr/bin/java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory=/System ... If you look at the entire line, you will often see these set multiple times with different values. The last one is what is used. I could not find any other values set in that line... So Chuk, you also propose to raise this default? This causes me to ask another question. What is better scalability mechanism? Increasing memory for single instance or adding extra instances? Raising memory seems more resource effective. So why would I use multiple instances on single server? Or such means are some kind of rudiment? Gennady ___ 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: Memory control
Hi, Finally at about 95 hours I get OutOfMemory error as the heap is limited by default to 64M. 64M seems small to me for a Java app. I did not do any memory regulations myself. It is just default on my absolutely standard deployment system for WO (Xserve G4 , 2GB, MacOS X 10.5, Java 1.5.0_24) I found this 64M doing ps ax | grep java It lists all WO apps like this: /usr/bin/java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory=/System ... So as I understand -Xmx64m - that is maximum heap size. Actual memory usage for whole JVM is about 300M. So my question is - what should I do now? Is it expected behavior for large WO application? Using 64M+ of memory is, the increasing heap size is not. What are other means to increase memory used? Or such behavior should be considered as my error somewhere in code? So where should I look for memory leaks? You mentioned before exceptions, that is where I would start. Also check that your session sleep(), awake(), and terminate() can never throw an exception. If you are getting deadlocked sessions, then the session, page cache, and related EOs will never get garbage collected. Most exceptions I get now are cased by java.lang.OutOfMemoryError: Java heap space So that is what I am trying to get rid of. I get any other exceptions not more often than once a month whereas OutOfMemoryError comes nearly every 5th day =( Also check that your session sleep(), awake(), and terminate() can never throw an exception. Would I see such exceptions in log if they happen? I did not see any yet. Beyond that, I would try a heap analyzer to see what the objects are that do not get collected. What is heap analyzer ? And where can I get it? Gennady ___ 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: Memory control
Hello again everybody. I still hope somebody would answer. I'va made GC logging with -XX:+PrintGCDetails and I see some interesting things happening. It seems like some uncollectable garbage is being accumulated in memory. Within the first hour heap usage goes up 35M and then within next 6 hours falls back to that number after rare fullGC acts. After 8 hours that lower limit goes up to 40M, after 20 hours - to 45M and fullGC acts happen significantly more often. After 30 hours heap usage would not fall lower 50M and after 35 hours almost every GC is fullGC. Since 60 hour lowest heap usage is 55M. Finally at about 95 hours I get OutOfMemory error as the heap is limited by default to 64M. So my question is - what should I do now? Is it expected behavior for large WO application? Should I simply rise max heap limit to find memory amount that would be enough? Should I schedule WOMonitor to restart the App every night? Or such behavior should be considered as my error somewhere in code? So where should I look for memory leaks? 2011/3/3 Gennady Kushnir genk...@rujel.net: Hello All! I would raise this topic again. Thanks for all tips you have me. Jprofiler is too commercial for me unfortunately. And VisualVM failed to run on my deployment system (Xserve G4). In fact even when run on my dev system, I could not actually figure out how it could help me :( I feel sad about I loosely know many aspects in Java technology. Could you give me some links where to read about such things as Eden, young generation and survivors - I did not get these terms. And about those ec's that don't get garbage collected. After eliminating all references to EO's outside components I still could not get rid of that issue. When debugging I've finally noticed inside a WOSession object an NSMutableDictionary called _contextRecords, which holds hard referenced on ALL previously used components. Even though I have reduced pageCacheSize to 5 in an Application constructor. And those components hold references to those ec's so they can't get garbage collected... Sad... ___ 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: Concurrent request handling
Hello all ! I am wondering whether to turn on concurrent request handling on my deployment or not. I always have this on. What are potential drawbacks of this? I assume there should be some. Why would it be off by default otherwise? I could not find anything interesting on this in documentation. WebObjects has several defaults that are not what most people would want. I think these defaults were set to preserve existing behavior when new features were added. Unless you are sharing unlocked global writable data (from static ivars or Application), there is no reason to NOT have this on. If you are sharing unlocked global writable data, then you are Bad Person and should fix this! Thank you for explanation. I think, I'll turn it on then. I hope I'm not that bad :-) And another question: would concurrent request handling save me from global application deadlocks when one single request locks on exception? Maybe. It depends on why that session/request is deadlocking. I would focus on fixing that. There is a theorem that every code has at least one error. And consequently it has unlimited number of errors. My code is several tens thousand rows written on different stages of my understanding of WebObjects Tao. Deadlock happen after some errors as ECs don't get unlocked after those unexpected throwings. Especially after Out of memory error that can not be captured. Gennady ___ 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
Concurrent request handling
Hello all ! I am wondering whether to turn on concurrent request handling on my deployment or not. What are potential drawbacks of this? I assume there should be some. Why would it be off by default otherwise? I could not find anything interesting on this in documentation. And another question: would concurrent request handling save me from global application deadlocks when one single request locks on exception? Gennady ___ 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: Memory control
Hello All! I would raise this topic again. Thanks for all tips you have me. Jprofiler is too commercial for me unfortunately. And VisualVM failed to run on my deployment system (Xserve G4). In fact even when run on my dev system, I could not actually figure out how it could help me :( I feel sad about I loosely know many aspects in Java technology. Could you give me some links where to read about such things as Eden, young generation and survivors - I did not get these terms. And about those ec's that don't get garbage collected. After eliminating all references to EO's outside components I still could not get rid of that issue. When debugging I've finally noticed inside a WOSession object an NSMutableDictionary called _contextRecords, which holds hard referenced on ALL previously used components. Even though I have reduced pageCacheSize to 5 in an Application constructor. And those components hold references to those ec's so they can't get garbage collected... Sad... ___ 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: Linux deployment advice
I have aready made my own set of rpms for automated WO install. It is targeted for AltLinux (russian distribution) but after certain modifications it may work for others Here they are: helloWO is a set of frameworks with a product - Hello WOrld application. http://sisyphus.ru/en/srpm/Sisyphus/helloWO/get woadaptor and Apache configuration http://sisyphus.ru/en/srpm/Sisyphus/woadaptor/get wotaskd and womonitor init.d scripts and and initial SiteConfig.xml http://sisyphus.ru/en/srpm/Sisyphus/webobjects/get rpm-macros set for building WO-rpms http://sisyphus.ru/en/srpm/Sisyphus/rpm-macros-webobjects/get 2011/2/24 John Baldwin johnbaldwinwebobje...@gmail.com: I would definitely be interested in such info and presentations. Alas, WOWODC isn't in the cards for me. But the post-conference videos would be. And an RPM would be great. John On Wednesday Feb 23 10:11 AM, at 10:11 AM, Pascal Robert wrote: Le 2011-02-23 à 12:23, Joe Little a écrit : I can help with RPMs. I guess this part is open sourced. We don't need any jars for java monitor right? WO jars are embedded in JavaMonitor and wotaskd, but the license allow shipping the WO frameworks as part of a product, and for me JavaMonitor and wotaskd are products :-) On Feb 23, 2011, at 6:41 AM, Pascal Robert prob...@macti.ca wrote: Le 2011-02-23 à 11:20, Klaus Berkling a écrit : On Feb 23, 2011, at 8:14 AM, David LeBer wrote: I'm thinking of doing a presentation on the WebEx channel on how to install a WO deployment environment on Linux (CentOS/RedHat), any interest for this? If anyone is interested in our experience with deploying to Ubuntu on Linode I'd be happy to gush about that over a beer at WOWOWDC. I'd be interested in that. Question is how much would I remember over a few beers? We can always do a deployment session at WOWODC that target CentOS, Ubuntu/Debian and whatever, but I don't think we need 65 minutes for this. I do plan to make a RPM for CentOS/RedHat that would instead the Apache module + Monitor + wotaskd. Side note. Anyone ever put a WOApp on a Sun Sparc 100 running FreeBSD? kib We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths. Walt Disney Klaus Berkling Web Application Dev. Systems Administrator DynEd International, Inc. www.dyned.com | blog ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ 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/jmlittle%40gmail.com This email sent to jmlit...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnbaldwinwebobjects%40gmail.com This email sent to johnbaldwinwebobje...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Employing mod_deflate Apache module
Thank you. Sorry for long delay after your responses. Simply setting SetOutputFilter DEFLATE also did work for me. previously I tried AddOutputFilterByType DEFLATE text/html ...etc... Though it worked for static resources it failed to deflate dynamic ones. Maybe that is because apache doesn't read headers for plugin generated responses? Regards, Gennady Kushnir 2011/2/15 Patrick Middleton patr...@onestep.co.uk: On 15 Feb 2011, at 09:54, Patrick Middleton wrote: On 14 Feb 2011, at 18:27, Gennady Kushnir wrote: ... Is this a module load order problem? Which version of Apache have you got? Is mod_deflate.so loaded before mod_WebObjects.so, or after? Further research reveals that while module load order was very significant for Apache 1.3 (mod_rewrite et al), it's not significant for Apache 2.2, where modules can specify their own hook ordering preferences. The easiest way of seeing what's going on is to enable mod_info. After doing that, I saw that many modules in their configuration stanzas had this: SetOutputFilter DEFLATE while mod_WebObjects (for me, configured via /Library/WebObjects/Adaptors/Apache2.2/apache.conf) did not. After adding it, deflate now works for me with WO-generated content. 2011/2/14 Timo Hoepfner th-...@onlinehome.de: If it's a Wonder app, add this to you Properties and you're done: er.extensions.ERXApplication.responseCompressionEnabled=true Timo Am 14.02.2011 um 09:59 schrieb Gennady Kushnir: Hello list! I've just tried to compress traffic produced by my WOApp but I only succeeded in compressing static resources (css and js). Here is my configuration fragment. IfModule mod_deflate.c AddOutputFilterByType DEFLATE text/html application/xhtml+xml text/plain text/xml \ text/css text/javascript application/x-javascript application/javascript /IfModule Does anybody know what should be written to Apache mod_deflate configuration so that it also compress WO-generated pages? Regards, Gennady This email, including any attachments, is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient you must not disseminate, distribute or copy any part of this email nor take any action in reliance on it. If you have received this in error please notify the sender immediately by email or phone +44 (0)1702 426400 and delete this email and any attachments from your system. Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard-copy version. OneStep Solutions LLP is registered in England and Wales under registration number OC337173 and has its registered office at 457 Southchurch Road, Southend-on-Sea, Essex SS1 2PH. ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Any ideas how to minimize bot access?
Can you identify those bots by User-Agent? That would not disturb legitimate users. 2011/2/14 Amiel Montecillo bosyot...@gmail.com: Yeah that would be my last resort if I can't find a WO way to handling this. Thanks, Amiel On Mon, Feb 14, 2011 at 2:32 PM, Anthony Paras a...@earthlink.net wrote: Why don’t you implement a bot trap. For example... http://www.kloth.net/internet/bottrap.php On 2/13/11 11:16 PM, Amiel Montecillo bosyot...@gmail.com wrote: I'd appreciate it if anyone has any idea that he's willing to share how to minimize bad bots from accessing the site? ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Employing mod_deflate Apache module
Hello list! I've just tried to compress traffic produced by my WOApp but I only succeeded in compressing static resources (css and js). Here is my configuration fragment. IfModule mod_deflate.c AddOutputFilterByType DEFLATE text/html application/xhtml+xml text/plain text/xml \ text/css text/javascript application/x-javascript application/javascript /IfModule Does anybody know what should be written to Apache mod_deflate configuration so that it also compress WO-generated pages? Regards, Gennady ___ 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: Employing mod_deflate Apache module
It is not Wonder app. Why make such tricks whereas Apache should do that already? 2011/2/14 Timo Hoepfner th-...@onlinehome.de: If it's a Wonder app, add this to you Properties and you're done: er.extensions.ERXApplication.responseCompressionEnabled=true Timo Am 14.02.2011 um 09:59 schrieb Gennady Kushnir: Hello list! I've just tried to compress traffic produced by my WOApp but I only succeeded in compressing static resources (css and js). Here is my configuration fragment. IfModule mod_deflate.c AddOutputFilterByType DEFLATE text/html application/xhtml+xml text/plain text/xml \ text/css text/javascript application/x-javascript application/javascript /IfModule Does anybody know what should be written to Apache mod_deflate configuration so that it also compress WO-generated pages? Regards, Gennady ___ 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/th-dev%40onlinehome.de This email sent to th-...@onlinehome.de ___ 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 question: WO puts IP address in URL when using HTTPS
As I remember, WO uses -WOHost runtime environment variable to form such urls. As to me, I use my own method to form secure URLs depending on client IP. Maybe Wonder offers some hook for that, let's wait for other replies. 2011/2/14 Christoph Wick c.w...@academy.de: Hi John, thanks for your hint. Unfortunately the apache config is not the problem here, but it is WebObjects (or Wonder) that puts the IP-Addresses into the URL if you are using HTTPS. What I need are relativ URLs (without IPs), because the app shall be accessible from both, before and behind the firewall. C.U.CW -- Christoph Wick Director Software Development STAR Healthcare Management GmbH, Pierstr. 8, 50997 Cologne, Germany Fon:+49 2236 33665-50 Fax:+49 2236 33665-90 www.starhealthcare.info --- Sitz der Gesellschaft: Köln, Amtsgericht Köln, Reg.Nr.: HRB 55306 On 14.02.2011, at 16:13, John Huss wrote: This is determined by the ServerName setting in apache, which is probably not matching your regular (http) settings. John On Mon, Feb 14, 2011 at 7:30 AM, Christoph Wick c.w...@academy.de wrote: Hi there, one of my clients runs a WO application on a Linux box behind a firewall. The internal IP of the box is e.g. 192.168.1.100. The external IP (through the firewall) is e.g. 1.2.3.4. Running the app using HTTP is no problem, since all Link-URLs are built as URIs only, e.g. a href=/cgi-bin/WebObjects/App.woa/... But if we use HTTPS, the Link-URLs are built as full URLs using the internal IP address, e.g. a href=https://192.168.1.100/cgi-bin/WebObjects/App.woa/...; Links like this are - obviously - not accessable through the firewall. Any ideas? A magic switch in Wonder, I was missing ... Thx, C.U.CW -- Christoph Wick Director Software Development STAR Healthcare Management GmbH, Pierstr. 8, 50997 Cologne, Germany Fon:+49 2236 33665-50 Fax:+49 2236 33665-90 www.starhealthcare.info --- Sitz der Gesellschaft: Köln, Amtsgericht Köln, Reg.Nr.: HRB 55306 ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com This email sent to johnth...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Mailing software
We are sending emails via gmail using 10 seconds delay. Works yet. 2011/2/11 Miguel Arroz ar...@guiamac.com: Hey Anjo, In essence, you have to throttle down the mail sending rate. Services like GMail and others will block your IP temporarily if they see a burst of emails coming from it to them. Regards, Miguel Arroz On 2011/02/11, at 12:51, Anjo Krank wrote: Hi, has anyone built direct marketing/personalized email software with WO (or used any reasonable package) that he'd like to share experiences with? I find my stuff is getting rejected probably due to the speed at which I sent mails out, but before I go around stumbling in the dark, it'd be great to hear people who have already been there... Cheers, Anjo ___ 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/arroz%40guiamac.com This email sent to ar...@guiamac.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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOLips deadlock
I'm getting the exact same problem. Does your deadlocks occurs when you save changes made in a component? I did not notice that first time. But now I'd say YES. 2010/12/18 Q qdo...@gmail.com: I spoke to mike about this recently, it's a race condition related to locking used for validation and validation caching, it's a difficult one to fix, and the only workaround I can think of would be to disable component validation. That is sad I would say. I do like the component validation feature. Thanks to one I've recently cleaned up a bunch of HTML inconsistencies in my project. And recently I'm still in process cleaning up obsolete wod bindings. Seems like I'll have to fall down to manual builds. Joe, thank you for the tip. On 18/12/2010, at 6:22 AM, Johnny Miller wrote: I have even a stranger problem. Not only did I have this problem in one project but I created a new project (that was a new version of the other project) and I had the same problem in a component that had the same name. I didn't copy and paste anything over because I was afraid that the old file was somehow contaminated. FWIW, if I do a save all instead of save I don't get the issue. best, Johnny On Dec 17, 2010, at 9:41 AM, Tim Worman wrote: It doesn't happen to me often but when it doesn't happen, it is when saving changes to a component - specifically in the html editor I believe. Tim Worman UCLA GSEIS On Dec 17, 2010, at 8:28 AM, Pascal Robert wrote: I'm getting the exact same problem. Does your deadlocks occurs when you save changes made in a component? You should report your problem to JIRA, see: http://issues.objectstyle.org/jira/browse/WOL-1198 Hello all I'v recently upgraded my dev environment to Eclipse 3.6 and a WOLips version recommended in wiki I like some new features but now I regularly bump into Eclipse deadlock and have to force quit it. Here is the jstack dump from the last deadlock. I am writing here and not Eclipse support as the dump totally contains of objectstyle classes so i assume that is WOLips problem Gennady jstack.txt ___ 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/probert%40macti.ca This email sent to prob...@macti.ca ___ 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/lists%40thetimmy.com This email sent to li...@thetimmy.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com This email sent to jlmil...@kahalawai.com Johnny Miller Kahalawai Media Corp http://www.kahalawai.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/qdolan%40gmail.com This email sent to qdo...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WOLips deadlock
Hello all I'v recently upgraded my dev environment to Eclipse 3.6 and a WOLips version recommended in wiki I like some new features but now I regularly bump into Eclipse deadlock and have to force quit it. Here is the jstack dump from the last deadlock. I am writing here and not Eclipse support as the dump totally contains of objectstyle classes so i assume that is WOLips problem Gennady 2010-12-17 10:52:18 Full thread dump Java HotSpot(TM) 64-Bit Server VM (17.1-b03-307 mixed mode): Attach Listener daemon prio=9 tid=113506000 nid=0x149d9a000 waiting on condition [] java.lang.Thread.State: RUNNABLE Worker-109 prio=5 tid=113577800 nid=0x149101000 in Object.wait() [14910] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 11b678870 (a java.lang.Object) at java.lang.Object.wait(Object.java:485) at org.objectstyle.wolips.wodclipse.core.builder.WodBuilder$ValidationProgressJob.run(WodBuilder.java:379) - locked 11b678870 (a java.lang.Object) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) WodOutline prio=6 tid=11359b000 nid=0x14db01000 in Object.wait() [14db0] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 11bc539d8 (a org.objectstyle.wolips.baseforplugins.util.Throttle) at java.lang.Object.wait(Object.java:485) at org.objectstyle.wolips.baseforplugins.util.Throttle.run(Throttle.java:124) - locked 11bc539d8 (a org.objectstyle.wolips.baseforplugins.util.Throttle) at java.lang.Thread.run(Thread.java:680) Worker-108 prio=5 tid=113578800 nid=0x149a04000 in Object.wait() [149a03000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 11a7d85c0 (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185) - locked 11a7d85c0 (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50) Worker-105 prio=5 tid=153ff5800 nid=0x14838e000 in Object.wait() [14838d000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 11a7d85c0 (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185) - locked 11a7d85c0 (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:50) WodOutline prio=6 tid=1145c7000 nid=0x1465be000 in Object.wait() [1465bd000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 11a58f830 (a org.objectstyle.wolips.baseforplugins.util.Throttle) at java.lang.Object.wait(Object.java:485) at org.objectstyle.wolips.baseforplugins.util.Throttle.run(Throttle.java:124) - locked 11a58f830 (a org.objectstyle.wolips.baseforplugins.util.Throttle) at java.lang.Thread.run(Thread.java:680) pool-1-thread-4 prio=5 tid=113528800 nid=0x149901000 waiting on condition [14990] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 11b723a70 (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:680) pool-1-thread-3 prio=5 tid=1146f7000 nid=0x14943f000 waiting for monitor entry [14943e000] java.lang.Thread.State: BLOCKED (on object monitor) at org.objectstyle.wolips.wodclipse.core.completion.AbstractCacheEntry.shouldParse(AbstractCacheEntry.java:257) - waiting to lock 120c8bf18 (a org.objectstyle.wolips.wodclipse.core.completion.WodCacheEntry) at org.objectstyle.wolips.wodclipse.core.completion.WodParserCache.parse(WodParserCache.java:285) at org.objectstyle.wolips.wodclipse.core.builder.WodBuilder._validateComponent(WodBuilder.java:324) at org.objectstyle.wolips.wodclipse.core.builder.WodBuilder$ValidatingComponent.run(WodBuilder.java:428) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at
Re: Database Connection Question
Thank you for these tips The point is that I do use multiple EOF stacks. I clearly admit that each EOObjectStoreCoordinator gets its own set of db connections. It only needs a single connection to work. Let's say single connection for each used database ;) In fact that is a goal I'd like to achieve to have a single connection for a EOF stack per database. That is what should happen *if* the connection dictionaries are equals() and you close the jdbc2info connections. Hmm. I'll put some more research into it. Strangely I do have multiple connections yet. I should find what ruins equality... if it is so I use separate EOF stack to access previous year data stored in a separate database with identical structure. That is why I employ EODatabaseContext.forceConnectionWithModel(model,connectionDict,ec) And that is why my models get identical connection dictionary. I am not sure if that is the best / right way to do this. I did not find any other method to connect a model do different databases. You need to create a new model group for the new EOF stack (the one using data from previous years), add the models, and update the connection dictionaries before using the EOF stack. I'not sure I got it right. I'm using the same models to access different databases. Should I clone them and place copies to another model group? So the modelGroup is going to be the root of EOF stack, not the DatabaseContext this time? And by the way, what is this method intended for after all? ___ 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: Snow Leopard Deployment
In my case I did the same thing as on linux deployment: substituted /cgi-bin/... with /Apps/... in woadaptor configuration file ( /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf ) so that WO does not conflict with standard ScriptAlias 2010/11/24 Ron Lift rpgi...@gmail.com: Thank you commenting out the ScriptAlias /cgi-bin/ /Library/WebServer/CGI-Executables/ fixed the problem On Wed, Nov 24, 2010 at 1:24 PM, Ralf Schuchardt r...@gmx.de wrote: Hi, Am 24.11.2010 um 18:16 schrieb Mark Ritchie: Hey, On 24/Nov/2010, at 8:33 AM, Ron Lift wrote: ... When I use http://servernamecgi-bin/WebObjects/appname I get a 404 error. The webserver log has “script not found or unable to stat: /Library/WebServer/CGI-Executables/WebObjects” First off, how did '.../cgi-bin/...' become '.../CGI-Executables/...' ? The 10.6 standard httpd.conf has at least one ScriptAlias statement like ScriptAlias /cgi-bin/ /Library/WebServer/CGI-Executables/ that has to be commented out to get WebObjects working. Ralf ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Memory control
Hello list. I've got Out of memory error once, when an app was under significant load serving multiple users. I am wondering if there is a way to monitor memory usage and possibly force garbage-collection of unused objects. For example, when debugging with MultiECLockManager I noticed that formerly used editing contexts do not get garbage collected. Gennady ___ 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: Database Connection Question
The point is that I do use multiple EOF stacks. I clearly admit that each EOObjectStoreCoordinator gets its own set of db connections. It only needs a single connection to work. Let's say single connection for each used database ;) In fact that is a goal I'd like to achieve to have a single connection for a EOF stack per database. I use separate EOF stack to access previous year data stored in a separate database with identical structure. That is why I employ EODatabaseContext.forceConnectionWithModel(model,connectionDict,ec) And that is why my models get identical connection dictionary. I am not sure if that is the best / right way to do this. I did not find any other method to connect a model do different databases. I am quite interested if multiple models could share single db context and thus lower the number of open connections. They can't share db contexts across EOF stacks. That's quite clear. I am speaking about several models within one stack connecting to the same database. During my experimentations I have found that it is EODatabaseContext.forceConnectionWithModel(...) the one who create a connection for a mentioned model which does not get reused afterwards. May be that is aforementioned JDBCinfo connection? Maybe or it could be a side effect or misuse of that method. Are the models already connected in the new EOF stack before you call this? No, they are not connected. I call this in Application constructor. And also this method is the only place where models get correct connection dictionary. Gennady ___ 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: Database Connection Question
Hello Chuck and others. I'd like ask some more questions ) 2010/8/27 Chuck Hill ch...@global-village.net: On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote: I am revisiting some old EOF documentation and wanted to make sure I understood a few things. Are the following statements true? * When an EOModel is found and connected to a database when the app starts up each database connection is mapped to an EODatabaseChannel? I think that EODatabaseContext is more correct than EODatabaseChannel. The context will then use the channel. A db context can handle multiple models (the connection information needs to be the same). How can single db context handle multiple models ? I see that EODatabaseContext.forceConnectionWithModel(model,cd,ec) returns different objects for different models, whereas most of my models point to the same database with the same connection dictionary. And would it make sense to somehow force all these models to single db context? Is there a default number of EODatabaseChannels opened when the app starts up? Is there a configuration setting that I can set to add more? One per db context and no. My problem is that I see my app opening more connections than a number of models it has. And those connections do not close even after more than an hour not used. And it does not reuse all of them for later requests but may create even more connections. As a result when running multiple instances on a server with limited DB-connections I do get too many connections error sometimes. How could I fight it? Is it possible to control the number of open connections and close unused ones after certain idle time? Gennady Kushnir 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
WebObjects RPM package for Linux
Hello list. I want to share with you a set of rpm installer packages intended for easy WO installation on Linux. I've prepared them to facilitate distribution of my WO product (RUJEL), but I assume, they may be valuable by themselves. http://sisyphus.ru/en/packager/baywind/srpms There are 3 separate RPMs: helloWO holds all java staff, woadaptor holds adaptor and adaptor configuraton , webobjects holds init.d scripts to run wotaskd and WOMonitor RPMs are targeted to AltLinux but also may work for other distributions. Anyway src.rpm are also available so feel free to adapt them. Installation paths are chosen to meet Linux JPackage Policy . Feedback welcome Gennady Kushnir Russia ___ 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: Avoiding java.lang.OutOfMemoryError: Java heap space
Thanks to all. Susanne, in fact my background pages should not be stored because I initialize my dummyContext to deny page storing: WOContext dummyContext = new WOContext(request) { public boolean shouldNotStorePageInBacktrackCache() { return true; } }; I have tested this and mentioned that whereas WOSession.savePage() is invoked for my page but savePageInPageCache() is actually not. So I assume the page is not actually saved. Farrukh, I've added EOEditingContext creation and dispose() into the loop. It did help, thank you. But I thought that editing context does not hold strong references to its objects and so unnecessary ones should be garbage collected... Well whereas I'm happy that my code is working right now I'm still not sure that such problems won't revive once. Could anyone suggest how to keep track of memory usage in my application and how to tell what is consuming memory in the moment. Gennady 2010/6/23 Susanne Schneider susanne.schnei...@interactive-systems.de: Hi Gennady, we are doing similar background tasks here. To avoid memory problems we declared the generated HTML pages not to be stored into the page cache. This background pages implement the Interface IASUnsaveablePage: public interface IASUnsaveablePage { /** * defines if this page should be saved in the WO page cache * * @return returning true is the same as not implementing * the interface */ public boolean shouldBeSavedInPageCache(); } and in our custom session class we override savePage(): /** * implements the meachanism for the IASUnsaveablePage * * @see IASUnsaveablePage#shouldBeSavedInPageCache() */ �...@override public void savePage(WOComponent page) { if (!(page instanceof IASUnsaveablePage) || ((IASUnsaveablePage) page).shouldBeSavedInPageCache()) { super.savePage(page); } } Maybe you could use a similar approach? HTH, Susanne Hello List! I have a task to form an archive of a good bunch of WO-generated HTML pages to HDD. To achieve this I create a background thread to perform the task. In this thread I create a dummy WOContext : WOApplication app = WOApplication.application(); String dummyUrl = app.cgiAdaptorURL() + / + app.name() + .woa/wa/dummy; if(ses != null) { dummyUrl = dummyUrl + ?wosid= + ses.sessionID(); } WORequest request = app.createRequest( GET, dummyUrl, HTTP/1.0, null, null, null); WOContext dummyContext = new WOContext(request) { public boolean shouldNotStorePageInBacktrackCache() { return true; } } After that in a loop I prepare my pages (in fact there are several WOComponent's in work): WOComponent page = WOApplication.application().pageWithName(MyPageName, dummyContext); and write them to HDD: NSData content = page.generateResponse().content(); content.writeToStream(fileOutputStream); The problem is that when the loop is long and the page contents is complex my JVM runs out of memory. What am I doing wrong? It seems like WO is storing something unnecessary, how should I tell it to forget that? At least how can I diagnose what exactly the memory is filled with? Gennady -- Susanne Schneider Coordinator secuTrial Development iAS interActive Systems GmbH Dieffenbachstraße 33 c, D-10967 Berlin fon +49(0)30 22 50 50 - 498 fax +49(0)30 22 50 50 - 451 mail susanne.schnei...@interactive-systems.de web http://www.interActive-Systems.de Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche Sitz der Gesellschaft: Berlin Amtsgericht Berlin Charlottenburg, HRB 106103B ___ 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
Avoiding java.lang.OutOfMemoryError: Java heap space
Hello List! I have a task to form an archive of a good bunch of WO-generated HTML pages to HDD. To achieve this I create a background thread to perform the task. In this thread I create a dummy WOContext : WOApplication app = WOApplication.application(); String dummyUrl = app.cgiAdaptorURL() + / + app.name() + .woa/wa/dummy; if(ses != null) { dummyUrl = dummyUrl + ?wosid= + ses.sessionID(); } WORequest request = app.createRequest( GET, dummyUrl, HTTP/1.0, null, null, null); WOContext dummyContext = new WOContext(request) { public boolean shouldNotStorePageInBacktrackCache() { return true; } } After that in a loop I prepare my pages (in fact there are several WOComponent's in work): WOComponent page = WOApplication.application().pageWithName(MyPageName, dummyContext); and write them to HDD: NSData content = page.generateResponse().content(); content.writeToStream(fileOutputStream); The problem is that when the loop is long and the page contents is complex my JVM runs out of memory. What am I doing wrong? It seems like WO is storing something unnecessary, how should I tell it to forget that? At least how can I diagnose what exactly the memory is filled with? Gennady ___ 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
Current licensing policy
Hello all! I have a legal question as I'm gong to distribute my WO-application wider than in my single organization. And most installations are going to be on Linux. And I'm not quite sure that Apple allows me to do that. We want one Linux distribution holders to include my project into their repository, but they are strict that everything in repository should be legally clean. The last bit of license regarding WO I have seen was in WO 5.4.3 Update installer. It stated that I can distribute WO libraries as a part of product. Well, I guess that's just fine. But it was 1.5 year ago... ... also it says that I can distribute it only for use by end-users - does it mean I can't give it out for inclusion into repository? Can anybody say what is Apple's current politics about WO? From my own research: WO is never mentioned on front pages of their website (since it was removed from X Server). The only place where it cal be found now is http://developer.apple.com/tools/webobjects/index.html Apple's current reference library does not contain ANY official documentation for WO. However it still can be accessed by old direct links that redirect to Obsolete section of library. And that documentation is really obsolete in fact - telling about developing in Xcode. So it seems like Apple does not have ANY public policy about WO. And that results into legal problems to us... It seems to me that today Apple just uses those libraries as a base for their stores and they have no reason to release any updates to it for us. Their shops are so cool full of AJAX and other stuff... I hardly believe they still use that primitive Component Actions Request Handler unmodified to make it. Well... that's offtop though - nothing about Legal ) Gennady Kushnir ___ 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: Objects don't get initialized sometimes
It seems like these errors are finally gone! Yippee!! The last thing I have done was to retire nested editing context and stay in main one. In fact, during this operation I've mentioned one improper transfer of object between these contexts. But I decided to fulfill my plan to be sure. Thanks everyone for help! Ken, thank you too. I have corrected that point with BigDecimal. Though luckily it was not really critical in fact. 2010/1/14 Chuck Hill ch...@global-village.net: On Jan 13, 2010, at 7:36 PM, Ken Anderson wrote: One minor point... weight, which is a BigDecimal, is immutable. The 'setScale' method actually returns a new BigDecimal, so this code will not do what is intended. This has to be one of my biggest pet peeves... it is probably the worst named method in all of Java land. And that means it has some stiff competition! But that is a truly evil name for what that method actually is. Ken On Jan 13, 2010, at 6:53 PM, Chuck Hill wrote: if(weight.scale() 0) weight.setScale(0); return weight; -- 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: need help with javascript path when app is deployed
Why don't you use dynamic url construction? WOResourceManager.urlForResourceNamed(String aResourceName, String aFrameworkName, NSArray aLanguagesList, WORequest aRequest) As to me, I've written a custom dynamic element for scripts and stylesheets: http://github.com/baywind/reusables/blob/master/Sources/net/rujel/reusables/ResourceLink.java 2010/1/24 Baiss Eric Magnusson bmagnus...@comcast.net: I get not found JavaScript file: http://track-your-finances.com/WebObjects/tyf.woa/Contents/WebServerResources/tyf/jsScripts/ObjSelect_js.txt If I enter the above into the browser on the server it gets the file, but not from a remote computer. This the .wod file js_OnChange: WOJavaScript { scriptSource = tyf/jsScripts/ObjSelect_js.txt; } This is the pwd from Terminal on the Server cascadewebdesign:jsScripts baiss$ pwd /Library/WebServer/Documents/tyf/WebObjects/tyf.woa/Contents/WebServerResources/tyf/jsScripts cascadewebdesign:jsScripts baiss$ ls -l -rwxr-xr-x 1 baiss admin 2695 Nov 18 17:53 ObjSelect_js.txt This is the html source from the browser window script language=JavaScript type=text/javascript src=/WebObjects/tyf.woa/Contents/WebServerResources/tyf/jsScripts/ObjSelect_js.txt/script Thanks for the help, Baiss ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Objects don't get initialized sometimes
may this be the reason? public void setWeight(BigDecimal aValue) { if(weight().compareTo(aValue) != 0) { if(weight().compareTo(BigDecimal.ZERO) == 0 || aValue.compareTo(BigDecimal.ZERO) == 0) _integralPresenter = null; super.setWeight(aValue); } } public BigDecimal weight() { BigDecimal weight = super.weight(); if(weight == null) return null; if(weight.compareTo(BigDecimal.ZERO) == 0) return BigDecimal.ZERO; weight = weight.stripTrailingZeros(); if(weight.scale() 0) weight.setScale(0); return weight; } where weight is EO attribute And another guess: fetching from the same ec for setting default values in awakeFromInsertion? 2010/1/12 Chuck Hill ch...@global-village.net: On Jan 11, 2010, at 2:14 PM, Gennady Kushnir wrote: I am on MySQL 5.0.x I don't use change notification framework. Stack trace of exception says it is raised during ec.saveChanges(). May it be caused by using nested editing contexts? Maybe if you are using them incorrectly. Unfortunately I have no idea how to isolate a problem. I can not even reproduce it. Myself I have only seen it once in action. Mostly I can only see it in logs. And I can't afford to limit functionality of a working system. Furthermore I assume it is in the most actively employed part of a system. As most errors take place there. But maybe it is only because the majority of saves are performed there... Maybe I could diagnose the problem injecting some testing somewhere? Maybe in editingContext subclass? I'd start by taking a careful look at the full exception stack traces to see if you can isolate where this is happening and then go back and very carefully review that code. After that, you would need to start disassembling the Java to see where things go wrong and try and get some information logged out. That may require replacing parts of EOF. This is far easier with Wonder but it is still not easy. I have had the most success by carefully looking at the code after looking at the stack traces. Chuck 2010/1/11 Kieran Kelleher kieran_li...@mac.com: On Jan 11, 2010, at 1:59 PM, Chuck Hill wrote: On Jan 11, 2010, at 10:33 AM, Kieran Kelleher wrote: On Jan 11, 2010, at 1:03 PM, Chuck Hill wrote: On Jan 11, 2010, at 4:26 AM, Gennady Kushnir wrote: Hello again. I've got it that I was doing something wrong. I've found and removed several commandments violations, employed MultiECLockManager for properly locking everything... but I am still getting these errors! How could I track where is that violation hidden within over 5000 rows of code? There are many, many ways in which things can be done wrong. I don't know of any easy way to find the source. If you can isolate and reproduce the problem in a minimum set of steps, that will reduce the amount of code you have to look at. These errors raise without any visible dependencies. Users report that even when system says that it could not save something (because of that strange error), actually data is saved and can be reviewed after logging out and in again. Something else is happening in your code then. Perhaps this is not from a save? Nothing should get written to the database if this happens during a saveChanges. Maybe this is happening in your app just after saveChanges()? Hmmm ... half-saving transactions is a common problem when you don't use a transactional database and no transaction rollback is available when ec fails during a save. What database engine are you using? Now who would use a squirrelly mock database like that?!!? Someone who acquires a Ferrari and drives it in first gear because they have never used a stick-shift car before! :-P :-P 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 -- 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: Objects don't get initialized sometimes
2010/1/13 Chuck Hill ch...@global-village.net: On Jan 13, 2010, at 4:04 AM, Gennady Kushnir wrote: may this be the reason? public void setWeight(BigDecimal aValue) { if(weight().compareTo(aValue) != 0) { if(weight().compareTo(BigDecimal.ZERO) == 0 || aValue.compareTo(BigDecimal.ZERO) == 0) _integralPresenter = null; super.setWeight(aValue); } } public BigDecimal weight() { BigDecimal weight = super.weight(); if(weight == null) return null; if(weight.compareTo(BigDecimal.ZERO) == 0) return BigDecimal.ZERO; weight = weight.stripTrailingZeros(); if(weight.scale() 0) weight.setScale(0); return weight; } where weight is EO attribute I don't think that will cause this problem. That's too sad... I did hope I found a fault... It looks like direct violation of commandment to avoid modification of returned values in getter methods. Well anyway, I think I'll get rid of it and see what happens. Sadly I can not give up searching my code for such faults... And another guess: fetching from the same ec for setting default values in awakeFromInsertion? That is OK. In fact I'm glad to hear that. I wouldn't like to look for alternative solutions. Chuck 2010/1/12 Chuck Hill ch...@global-village.net: On Jan 11, 2010, at 2:14 PM, Gennady Kushnir wrote: I am on MySQL 5.0.x I don't use change notification framework. Stack trace of exception says it is raised during ec.saveChanges(). May it be caused by using nested editing contexts? Maybe if you are using them incorrectly. Unfortunately I have no idea how to isolate a problem. I can not even reproduce it. Myself I have only seen it once in action. Mostly I can only see it in logs. And I can't afford to limit functionality of a working system. Furthermore I assume it is in the most actively employed part of a system. As most errors take place there. But maybe it is only because the majority of saves are performed there... Maybe I could diagnose the problem injecting some testing somewhere? Maybe in editingContext subclass? I'd start by taking a careful look at the full exception stack traces to see if you can isolate where this is happening and then go back and very carefully review that code. After that, you would need to start disassembling the Java to see where things go wrong and try and get some information logged out. That may require replacing parts of EOF. This is far easier with Wonder but it is still not easy. I have had the most success by carefully looking at the code after looking at the stack traces. Chuck 2010/1/11 Kieran Kelleher kieran_li...@mac.com: On Jan 11, 2010, at 1:59 PM, Chuck Hill wrote: On Jan 11, 2010, at 10:33 AM, Kieran Kelleher wrote: On Jan 11, 2010, at 1:03 PM, Chuck Hill wrote: On Jan 11, 2010, at 4:26 AM, Gennady Kushnir wrote: Hello again. I've got it that I was doing something wrong. I've found and removed several commandments violations, employed MultiECLockManager for properly locking everything... but I am still getting these errors! How could I track where is that violation hidden within over 5000 rows of code? There are many, many ways in which things can be done wrong. I don't know of any easy way to find the source. If you can isolate and reproduce the problem in a minimum set of steps, that will reduce the amount of code you have to look at. These errors raise without any visible dependencies. Users report that even when system says that it could not save something (because of that strange error), actually data is saved and can be reviewed after logging out and in again. Something else is happening in your code then. Perhaps this is not from a save? Nothing should get written to the database if this happens during a saveChanges. Maybe this is happening in your app just after saveChanges()? Hmmm ... half-saving transactions is a common problem when you don't use a transactional database and no transaction rollback is available when ec fails during a save. What database engine are you using? Now who would use a squirrelly mock database like that?!!? Someone who acquires a Ferrari and drives it in first gear because they have never used a stick-shift car before! :-P :-P 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 -- 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
Re: Wrong classpath generated (JavaWOExtensions.jar)
I assume I substituted framework both on development and deployment environments. And renamed jar to lowercase afterwards. How could I identify them now? 2010/1/10 Mike Schrag msch...@mdimension.com: i still think chuck is right ... you're mixing and matching frameworks ... you should never have to do this. On Jan 9, 2010, at 7:17 PM, Gennady Kushnir wrote: 2010/1/9 Mike Schrag msch...@mdimension.com: what does the Info.plist for that framework say the name of the jar is? Thank you for that comment. Editing Info.plist did help. Actually it was a bit tricky to figure out which one of 5 mentions JavaWOExtensions should be changed to lowercase, but I succeeded anyway ) I do not remember for sure maybe I really did employ JavaWOExtensions.framework from Wonder because of some problems with native one (I do not remember what exactly). But if I did that, it was both on development and deployment systems but I also did rename jar file to conform classpaths. btw for what reason Wonder version of JavaWOExtensions.jar is named differently from native one? On Jan 9, 2010, at 12:03 PM, Gennady Kushnir wrote: Hello list. after upgrading to WOLips 3.5 from 3.3 I've got a problem with erroneous classpath to JavaWOExtensions.framework it generates WOROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/JavaWOExtensions.jar whereas real jar filename is in lowercase: javawoextensions.jar As a result I have a problem deploying on case sensitive filesystem I could not find the way to make wolips generate correct classpath so a had to change them manually... it does not seem like a good practice Thanks in advance ___ 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/mschrag%40mdimension.com This email sent to msch...@mdimension.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: Objects don't get initialized sometimes
Hello again. I've got it that I was doing something wrong. I've found and removed several commandments violations, employed MultiECLockManager for properly locking everything... but I am still getting these errors! How could I track where is that violation hidden within over 5000 rows of code? These errors raise without any visible dependencies. Users report that even when system says that it could not save something (because of that strange error), actually data is saved and can be reviewed after logging out and in again. I tried to find the source of error adding logging to awakeFromFetch when snapshot is uninitialized. But this log has never fired yet whereas I have already seen errors related to empty snapshot of object of that class... I am confused now... 2009/11/3 Chuck Hill ch...@global-village.net: Start here: http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Breaking+EOF Then http://www.google.com/search?q=llegalStateException+rowDiffsForAttributes+snapshot Chuck On Nov 3, 2009, at 2:02 AM, Gennady Kushnir wrote: Hello list! I have an occasionally occurring problem which I can not reproduce but regularly meet in usage logs. Editing context fails to save changes and reports: java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; . } does not contain value for attribute named colorNoWeight with snapshot key: colorNoWeight it also happens for different objects mentioning another attributes, but as I see a common situation is that _dbSnapshot value is empty dictionary so no matter what attribute is mentioned. Why could this happen? Object in question was surely in database, not just created or deleted. Also sometimes I get NullPointerException when accessing attributes described as not null, so it seems like object was not initialized on fetch. May it be because these objects were fetched or created and saved in child editing context and after that used (with EOUtilities.localInstanceOfObject() ) in parent ? Once I got reproducible malfunction working with temporary EOEditingContext. EOUtilities.localInstanceOfObject(ec, this) was returning an objects with all attributes set to null whereas original object was fine and was stored in database even before app launch. try { boolean cache = ec.hasChanges() if(cache) { ec = new EOEditingContext(); ec.lock(); AutoItog ai = (AutoItog)EOUtilities.localInstanceOfObject(ec, this); course = (EduCourse)EOUtilities.localInstanceOfObject(ec, course); result = calculator().collectRelated(course, ai, !namedFlags().flagForKey(runningTotal),true); } else { ec.lock(); result = calculator().collectRelated(course, this, !namedFlags().flagForKey(runningTotal),true); } ec.saveChanges(); if(cache) result = EOUtilities.localInstancesOfObjects(editingContext(), result); } catch (RuntimeException e) { logger.log(LogLevel.WARNING,Error collecting related, new Object[] {this,e}); } finally { ec.unlock(); } ___ 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: Wrong classpath generated (JavaWOExtensions.jar)
I am amazed... md5 on jar files are different. But file sizes and both plists (Info and version) are identical (except for that row I changed)... Both files are named in lowercase but the one on my development system is created 2/19/2008 and the one on deployment - 9/24/2007... which one is native and which one is Wonder? could anyone tell me md5 of native javawoextensions.jar? 2010/1/11 Mike Schrag msch...@mdimension.com: I really doubt you renamed the jar files (unless you specifically remember doing this, which then I would ask 'why?') ... Chuck's theory is WAY more plausible, that you are mixing your environment. I would md5 a known jar and compare, or just take the one you know to be right and put it everywhere. ms On Jan 11, 2010, at 6:58 AM, Gennady Kushnir wrote: I assume I substituted framework both on development and deployment environments. And renamed jar to lowercase afterwards. How could I identify them now? 2010/1/10 Mike Schrag msch...@mdimension.com: i still think chuck is right ... you're mixing and matching frameworks ... you should never have to do this. On Jan 9, 2010, at 7:17 PM, Gennady Kushnir wrote: 2010/1/9 Mike Schrag msch...@mdimension.com: what does the Info.plist for that framework say the name of the jar is? Thank you for that comment. Editing Info.plist did help. Actually it was a bit tricky to figure out which one of 5 mentions JavaWOExtensions should be changed to lowercase, but I succeeded anyway ) I do not remember for sure maybe I really did employ JavaWOExtensions.framework from Wonder because of some problems with native one (I do not remember what exactly). But if I did that, it was both on development and deployment systems but I also did rename jar file to conform classpaths. btw for what reason Wonder version of JavaWOExtensions.jar is named differently from native one? On Jan 9, 2010, at 12:03 PM, Gennady Kushnir wrote: Hello list. after upgrading to WOLips 3.5 from 3.3 I've got a problem with erroneous classpath to JavaWOExtensions.framework it generates WOROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/JavaWOExtensions.jar whereas real jar filename is in lowercase: javawoextensions.jar As a result I have a problem deploying on case sensitive filesystem I could not find the way to make wolips generate correct classpath so a had to change them manually... it does not seem like a good practice Thanks in advance ___ 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/mschrag%40mdimension.com This email sent to msch...@mdimension.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: Objects don't get initialized sometimes
I am on MySQL 5.0.x I don't use change notification framework. Stack trace of exception says it is raised during ec.saveChanges(). May it be caused by using nested editing contexts? Unfortunately I have no idea how to isolate a problem. I can not even reproduce it. Myself I have only seen it once in action. Mostly I can only see it in logs. And I can't afford to limit functionality of a working system. Furthermore I assume it is in the most actively employed part of a system. As most errors take place there. But maybe it is only because the majority of saves are performed there... Maybe I could diagnose the problem injecting some testing somewhere? Maybe in editingContext subclass? 2010/1/11 Kieran Kelleher kieran_li...@mac.com: On Jan 11, 2010, at 1:59 PM, Chuck Hill wrote: On Jan 11, 2010, at 10:33 AM, Kieran Kelleher wrote: On Jan 11, 2010, at 1:03 PM, Chuck Hill wrote: On Jan 11, 2010, at 4:26 AM, Gennady Kushnir wrote: Hello again. I've got it that I was doing something wrong. I've found and removed several commandments violations, employed MultiECLockManager for properly locking everything... but I am still getting these errors! How could I track where is that violation hidden within over 5000 rows of code? There are many, many ways in which things can be done wrong. I don't know of any easy way to find the source. If you can isolate and reproduce the problem in a minimum set of steps, that will reduce the amount of code you have to look at. These errors raise without any visible dependencies. Users report that even when system says that it could not save something (because of that strange error), actually data is saved and can be reviewed after logging out and in again. Something else is happening in your code then. Perhaps this is not from a save? Nothing should get written to the database if this happens during a saveChanges. Maybe this is happening in your app just after saveChanges()? Hmmm ... half-saving transactions is a common problem when you don't use a transactional database and no transaction rollback is available when ec fails during a save. What database engine are you using? Now who would use a squirrelly mock database like that?!!? Someone who acquires a Ferrari and drives it in first gear because they have never used a stick-shift car before! :-P :-P 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
Wrong classpath generated (JavaWOExtensions.jar)
Hello list. after upgrading to WOLips 3.5 from 3.3 I've got a problem with erroneous classpath to JavaWOExtensions.framework it generates WOROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/JavaWOExtensions.jar whereas real jar filename is in lowercase: javawoextensions.jar As a result I have a problem deploying on case sensitive filesystem I could not find the way to make wolips generate correct classpath so a had to change them manually... it does not seem like a good practice Thanks in advance ___ 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: Wrong classpath generated (JavaWOExtensions.jar)
2010/1/9 Mike Schrag msch...@mdimension.com: what does the Info.plist for that framework say the name of the jar is? Thank you for that comment. Editing Info.plist did help. Actually it was a bit tricky to figure out which one of 5 mentions JavaWOExtensions should be changed to lowercase, but I succeeded anyway ) I do not remember for sure maybe I really did employ JavaWOExtensions.framework from Wonder because of some problems with native one (I do not remember what exactly). But if I did that, it was both on development and deployment systems but I also did rename jar file to conform classpaths. btw for what reason Wonder version of JavaWOExtensions.jar is named differently from native one? On Jan 9, 2010, at 12:03 PM, Gennady Kushnir wrote: Hello list. after upgrading to WOLips 3.5 from 3.3 I've got a problem with erroneous classpath to JavaWOExtensions.framework it generates WOROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/JavaWOExtensions.jar whereas real jar filename is in lowercase: javawoextensions.jar As a result I have a problem deploying on case sensitive filesystem I could not find the way to make wolips generate correct classpath so a had to change them manually... it does not seem like a good practice Thanks in advance ___ 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/mschrag%40mdimension.com This email sent to msch...@mdimension.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
Objects don't get initialized sometimes
Hello list! I have an occasionally occurring problem which I can not reproduce but regularly meet in usage logs. Editing context fails to save changes and reports: java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; . } does not contain value for attribute named colorNoWeight with snapshot key: colorNoWeight it also happens for different objects mentioning another attributes, but as I see a common situation is that _dbSnapshot value is empty dictionary so no matter what attribute is mentioned. Why could this happen? Object in question was surely in database, not just created or deleted. Also sometimes I get NullPointerException when accessing attributes described as not null, so it seems like object was not initialized on fetch. May it be because these objects were fetched or created and saved in child editing context and after that used (with EOUtilities.localInstanceOfObject() ) in parent ? Once I got reproducible malfunction working with temporary EOEditingContext. EOUtilities.localInstanceOfObject(ec, this) was returning an objects with all attributes set to null whereas original object was fine and was stored in database even before app launch. try { boolean cache = ec.hasChanges() if(cache) { ec = new EOEditingContext(); ec.lock(); AutoItog ai = (AutoItog)EOUtilities.localInstanceOfObject(ec, this); course = (EduCourse)EOUtilities.localInstanceOfObject(ec, course); result = calculator().collectRelated(course, ai, !namedFlags().flagForKey(runningTotal),true); } else { ec.lock(); result = calculator().collectRelated(course, this, !namedFlags().flagForKey(runningTotal),true); } ec.saveChanges(); if(cache) result = EOUtilities.localInstancesOfObjects(editingContext(), result); } catch (RuntimeException e) { logger.log(LogLevel.WARNING,Error collecting related, new Object[] {this,e}); } finally { ec.unlock(); } ___ 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: EOModels occasionally loading too slowly?
Hi, Normally EOmodels are loaded on demand (when they are requested) you may force EModel to load calling EODatabaseContext.forceConnectionWithModel see API for details Regards, Gena 2009/11/3 Paul Hoadley pa...@logicsquad.net: Hello, I am using Wonder and extending ERXApplication, but I don't think this is Wonder-specific. WO 5.4.3. I have an app that loads 8 EOModels, 3 in the app's Resources folder, 5 in linked frameworks. The default page makes use of an entity in one of the models in an external framework. Every few runs, an exception is thrown before the first page can load: Error: java.lang.IllegalArgumentException: An object store for the entity Status could not be found. Verify that the entity is defined in an EOModel, and that the model is installed properly. To see what models are loaded, you can try printing the return value of EOModelGroup.defaultGroup() in your application. The problem appears to be that not all the models have loaded by the time that page is being displayed. Indeed, checking EOModelGroup.defaultGroup() shows between 1 and 4 or 5 of the 8 models have been loaded by the time that entity is needed on the default page. Sometimes the correct model has loaded, and the page is displayed. Other times it hasn't, and the app bails out with that error. By the time Application.didFinishLaunching() is called, they're all loaded. Are the models really being loaded asynchronously as the app launches? Is there some way I can force all of them to be loaded by the time the first page needs that specific entity? -- Paul. w http://logicsquad.net/ h http://paul.hoadley.name/ ___ 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Objects don't get initialized sometimes
thank you for hints 2009/11/3 Chuck Hill ch...@global-village.net: Start here: http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Breaking+EOF Then http://www.google.com/search?q=llegalStateException+rowDiffsForAttributes+snapshot Chuck On Nov 3, 2009, at 2:02 AM, Gennady Kushnir wrote: Hello list! I have an occasionally occurring problem which I can not reproduce but regularly meet in usage logs. Editing context fails to save changes and reports: java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; . } does not contain value for attribute named colorNoWeight with snapshot key: colorNoWeight it also happens for different objects mentioning another attributes, but as I see a common situation is that _dbSnapshot value is empty dictionary so no matter what attribute is mentioned. Why could this happen? Object in question was surely in database, not just created or deleted. Also sometimes I get NullPointerException when accessing attributes described as not null, so it seems like object was not initialized on fetch. May it be because these objects were fetched or created and saved in child editing context and after that used (with EOUtilities.localInstanceOfObject() ) in parent ? Once I got reproducible malfunction working with temporary EOEditingContext. EOUtilities.localInstanceOfObject(ec, this) was returning an objects with all attributes set to null whereas original object was fine and was stored in database even before app launch. try { boolean cache = ec.hasChanges() if(cache) { ec = new EOEditingContext(); ec.lock(); AutoItog ai = (AutoItog)EOUtilities.localInstanceOfObject(ec, this); course = (EduCourse)EOUtilities.localInstanceOfObject(ec, course); result = calculator().collectRelated(course, ai, !namedFlags().flagForKey(runningTotal),true); } else { ec.lock(); result = calculator().collectRelated(course, this, !namedFlags().flagForKey(runningTotal),true); } ec.saveChanges(); if(cache) result = EOUtilities.localInstancesOfObjects(editingContext(), result); } catch (RuntimeException e) { logger.log(LogLevel.WARNING,Error collecting related, new Object[] {this,e}); } finally { ec.unlock(); } ___ 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: Finalizer Exception occurred while finalizing EOEditingContext
Should I also lock editing context if I do not make any changes in it, just reading? 2009/6/28 Dov Rosenberg drosenb...@inquira.com: If you use an editingcontext in a thread you should manually lock/unlock it, otherwise you can see these kinds of errors. Dov On 6/27/09 7:02 AM, Gennady Kushnir genk...@rujel.net wrote: Hello list. My applications console log displays this error (multiple times) when performing a scheduled task (not in RR loop) [2009-6-27 14:53:30 MSD] Finalizer Exception occurred while finalizing EOEditingContext #13941350 :null In fact everything works fine, but I think this error should be dealt with though What does this mean and how can I get additional details for debugging this problem - this console message is the only output I get on this... ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/drosenberg%40inquira.com This email sent to drosenb...@inquira.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Finalizer Exception occurred while finalizing EOEditingContext
Thank you for this tip. I think that will be useful once. I did already solve this problem. Solution was to unlock ec before separating Thread and to lock it again in new thread. Thanks Dov Rosenberg. 2009/6/28 Chuck Hill ch...@global-village.net: On Jun 27, 2009, at 4:02 AM, Gennady Kushnir wrote: Hello list. My applications console log displays this error (multiple times) when performing a scheduled task (not in RR loop) [2009-6-27 14:53:30 MSD] Finalizer Exception occurred while finalizing EOEditingContext #13941350 :null In fact everything works fine, but I think this error should be dealt with though What does this mean and how can I get additional details for debugging this problem - this console message is the only output I get on this... Try adding this to your Properties file: NSPrivateDebuggingEnabled=true NSDebugLevel=3 That should dump out the whole exception. 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
Finalizer Exception occurred while finalizing EOEditingContext
Hello list. My applications console log displays this error (multiple times) when performing a scheduled task (not in RR loop) [2009-6-27 14:53:30 MSD] Finalizer Exception occurred while finalizing EOEditingContext #13941350 :null In fact everything works fine, but I think this error should be dealt with though What does this mean and how can I get additional details for debugging this problem - this console message is the only output I get on this... ___ 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
Zero dates 0000-00-00
Hello list. Is there some known hint to get rid with exception raised when dealing with zero dates in SQL? I'm taking data from database maintained with a third party program. When a date is undefined that program puts -00-00 into database which is acceptable for SQL but raises an exception in WO. How can I make EOF treat that value normally returning null for date in corresponding EnterpriseObject? Thanks in advance Gennady ___ 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
Fwd: NDN:
I get this reply every time I post into the list. Is it normal? Gennady -- Forwarded message -- From: Gateway Date: 2009/3/17 Subject: NDN: To: Gennady Kushnir genk...@rujel.net Sorry. Your message could not be delivered to: wodev,mail (The name was not found at the remote site. Check that the name has been entered correctly.) ___ 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: Zero dates 0000-00-00
What is the exception and stack trace? com.webobjects.jdbcadaptor.JDBCAdaptorException: Value '-00-00' can not be represented as java.sql.Date it shows 2 stacks... [2009-3-17 20:59:43 MSK] WorkerThread9 Value '-00-00' can not be represented as java.sql.Dateat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.ResultSetRow.getDateFast(ResultSetRow.java:134) at com.mysql.jdbc.ByteArrayRow.getDateFast(ByteArrayRow.java:235) at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2115) at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2067) at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4895) at com.webobjects.jdbcadaptor.JDBCColumn._fetchCorrectObject(JDBCColumn.java:294) at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:384) at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:372) at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:1462) at com.webobjects.eoaccess.EODatabaseChannel._fetchObject(EODatabaseChannel.java:321) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3071) at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) at com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4187) at com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172) at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570) at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) at net.rujel.vseobuch._VOStudent.lastName(_VOStudent.java:71) ... etc (NSKeyValueCoding and appendToResponse) and: at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:391) at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:372) at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:1462) at com.webobjects.eoaccess.EODatabaseChannel._fetchObject(EODatabaseChannel.java:321) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3071) at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) at com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4187) at com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172) at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570) at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) at net.rujel.vseobuch._VOStudent.lastName(_VOStudent.java:71) 2009/3/17 Chuck Hill ch...@global-village.net: On Mar 17, 2009, at 10:48 AM, Gennady Kushnir wrote: Hello list. Is there some known hint to get rid with exception raised when dealing with zero dates in SQL? I'm taking data from database maintained with a third party program. When a date is undefined that program puts -00-00 into database which is acceptable for SQL but raises an exception in WO. How can I make EOF treat that value normally returning null for date in corresponding EnterpriseObject? What is the exception and stack trace? Chuck Thanks in advance Gennady -- 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: Zero dates 0000-00-00
Thank you, ChukThis sounds intriguing. Something deep in EOF... I will experiment with this, but I can't find the best way to get the EOAdaptorChannel to set a delegate for it. Possibly intercepting it at the moment of creation. In fact I thought that was a common problem interacting with third party databases. And that there should exist some common solution... 2009/3/17 Chuck Hill ch...@global-village.net These are Java exceptions, not EOF exceptions. So this won't be easy... Look in EOAccess at the interface EOAdaptorChannel.Delegate. Specifically the adaptorChannelDidFetchRow method. You should be able to implement that, look for such values, and replace them with the null marker (or remove them, I don't recall the dictionary contents at this level). http://developer.apple.com/documentation/MacOSXServer/Reference/WO54_Reference/com/webobjects/eoaccess/EOAdaptorChannel.Delegate.html#adaptorChannelDidFetchRow(com.webobjects.eoaccess.EOAdaptorChannel,%20com.webobjects.foundation.NSMutableDictionary) I don't recall offhand how to set the delegate. I thought there was a notification, but I could not find it. Chuck On Mar 17, 2009, at 11:08 AM, Gennady Kushnir wrote: What is the exception and stack trace? com.webobjects.jdbcadaptor.JDBCAdaptorException: Value '-00-00' can not be represented as java.sql.Date it shows 2 stacks... [2009-3-17 20:59:43 MSK] WorkerThread9 Value '-00-00' can not be represented as java.sql.Dateat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.ResultSetRow.getDateFast(ResultSetRow.java:134) at com.mysql.jdbc.ByteArrayRow.getDateFast(ByteArrayRow.java:235) at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2115) at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2067) at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4895) at com.webobjects.jdbcadaptor.JDBCColumn._fetchCorrectObject(JDBCColumn.java:294) at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:384) at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:372) at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:1462) at com.webobjects.eoaccess.EODatabaseChannel._fetchObject(EODatabaseChannel.java:321) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3071) at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) at com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4187) at com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172) at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570) at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) at net.rujel.vseobuch._VOStudent.lastName(_VOStudent.java:71) ... etc (NSKeyValueCoding and appendToResponse) and: at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:391) at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:372) at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:1462) at com.webobjects.eoaccess.EODatabaseChannel._fetchObject(EODatabaseChannel.java:321) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3071) at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195) at com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4187) at com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89) at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172) at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570) at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) at net.rujel.vseobuch._VOStudent.lastName(_VOStudent.java:71) 2009/3/17 Chuck Hill ch...@global-village.net: On Mar 17, 2009, at 10:48 AM, Gennady Kushnir wrote: Hello list. Is there some known hint to get rid with exception raised when dealing with zero dates in SQL? I'm taking data from database maintained with a third party program. When a date is undefined that program puts -00-00 into database which is acceptable for SQL but raises an exception in WO. How can I make EOF treat that value normally returning null for date in corresponding EnterpriseObject? What is the exception and stack trace? Chuck Thanks
Re: Zero dates 0000-00-00
If it's MySQL your jdbc connection url should probably have: ?zeroDateTimeBehavior=convertToNull WOW! that worked! Thanks a lot! 2009/3/17 Lachlan Deck lachlan.d...@gmail.com: On 18/03/2009, at 4:48 AM, Gennady Kushnir wrote: Hello list. Is there some known hint to get rid with exception raised when dealing with zero dates in SQL? I'm taking data from database maintained with a third party program. What type of database? When a date is undefined that program puts -00-00 into database which is acceptable for SQL but raises an exception in WO. How can I make EOF treat that value normally returning null for date in corresponding EnterpriseObject? If it's MySQL your jdbc connection url should probably have: ?zeroDateTimeBehavior=convertToNull with regards, -- Lachlan Deck ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: AJAX without Wonder?
Thanks everybody for replies. I shall think it over. I believe that sometimes it may be better to reinvent some little wheel that would fit perfectly my specific road instead of adopting some ultimate wheel that can drive any unnecessary road. And it is uncertain what would take more time. ___ 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
AJAX without Wonder?
Hello all I have a question. Is there a way to use AJAX in WebObjects other than employing Wonder? I have rather large project and in fact I would not like to move it to using Wonder. I use AJAX for some tasks not related to modifying already displayed data on the page but in some cases it would be better to refresh some regions. I have seen some methods regarding AJAX and PageFragment's in 5.4 API reference. But there is no documentation on this. Could you please point me on some documentation or instructions how to make use or these capabilities. Gennady ___ 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: directActionURLForActionNamed produce corrupted hostname
Hello I have the same problem and this annoys me much. I seems an unexpected behavior to me to generate complete URLs including hostname when I don't ask for that. Also even when adding host name it would better take value from host header instead of server_name header. As host represents actual url in browser while server_name displays what a server intends to be, which would be wrong when working on local network with private IPs. Serge, did Apple reply anything on your bugreport? 2008/7/7 Serge Cohen sergeco...@users.sourceforge.net: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My mistake... Indeed this was an error in the setting of the apache server, producing a SERVER_NAME of ..._copy This happened when I set the HTTPS part of Apache through ServerAdmin. Serge. Le 6 juil. 08 à 00:24, Serge Cohen a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello list; I'm currently working on an application using Wonder (last updated on 2008-07-01) and WebObjects 5.4 (since few days 5.4.2, but the problem I'm reporting here was already present in previous version 5.4.1 ... I was just hoping for it to be solved in 5.4.2 until now). I have a layout page, using a couple of URL to direct actions. I generate those using the method : WOContext.directActionURLForActionNamed(String anActionName, NSDictionaryString,Object queryDictionary) (or ERXWOContext.directActionURLForActionNamed(String anActionName, NSDictionaryString,Object queryDictionary, boolean includeSessionID), which directly calls super... implementation) When pages are sent through 'http' (non-secured), the generated URL is an absolute path, but no scheme or host. When pages are sent through 'https', the generated URL are full URLs, including scheme and hostname. This is working fine as long as I'm in development setup (Eclipse as IDE), but as soon as I deploy, when a page is sent through 'https' the host name gets 'corrupted', more precisely '_copy' is appended to the host name (whilst, when sent by 'http', the URL are absolute, withOUT scheme or hostname). I've even tried to use Eclipse on the same machine that is running the deployed application : this does not show the behaviour of the deployed application. I've also noted the exact same type of problem when using a WOHyperlink 'connected' to a directAction, with the 'secure' binding set to false, and the page is sent using 'https'. Clearly, I don't understand well enough the difference between the dev. environment and the deployment one (in my case 'classical' wotaskd/JavaMonitor). I've reported this bug with ID : 6055888 In the mean time I'd like to be at least able to reproduce this behaviour when running from Eclipse (to debug and get a better understanding of what's going wrong) and hopefully a workaround (which should be possible, given the Dev. environment manages to get these generated URLs as they should). Thanks for any insight or help; Serge. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkhxWM8ACgkQlz6UVQtc2uyKpgCfTd/dfQGSuwUe8ybGjiBSBa66 0PwAoIRWOmGgmKFe6zkdoNpX7Swn3Pr0 =x6qF -END PGP 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/genkush%40rujel.net This email sent to genk...@rujel.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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Making a fake EO
Hello list! I have rather complicated question: is it possible to make an Enterprise Object that does not relate to any specific existing row in database? I want it to indicate vacant employee places where on the other hand I don't want to store NULL. So I want relationships pointing to zero which is not real primary key for any row in database to return that fake EO in my WOapp. And vice-versa - when I assign a relationship to fake EO - then a related cell in database should get zero value (not null). And also I want to be able to search database for that value using EOF. Is it possible somehow? Or my only way is to create a real record in my employee database called Mr. Vacancy and maybe even pay him salary :) Thanks in advance Gennady ___ 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: Making a fake EO
I thank everybody for you replies. Why don't you want to store null? Is this a situation where you don't have control over the DB? Is there a DBA that is trying to impose extreme normalization? I don't want null because on the other object in my database that may be related to some employee or unrelated to employee (with null foreign key) and also it may be related to vacant employee place. So I need some third option to indicate that aside from pointing to real employee or null. The other problem is that I am taking the list of employees from external database that is in use by another application which is not under my control. So it is undesirable to have that Mr. Vacancy in official reports. So I want relationships pointing to zero which is not real primary key for any row in database to return that fake EO in my WOapp. That is going to be very hard because EOF is automatically going to go to the Database to look up the instance that has a Primary Key of 0, and throw an error if it can't find it. It is possible with Wonder to have it just log the error and not terminate the application, but it is a scary hack if you are in control of the database. Well in fact I came across that several times. When there was no matching row row for foreign key EOF simply returned me an empty Enterprise Object with all attributes set to null. And the only place where I encountered an error was a NullPointerException when treating unexpectedly NULL attribute values. And maybe when saving. Well... by now I've only got that this is The Hard Way™ ... but no pointer to that way... Maybe I should consider some other ideas... ___ 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
Obtaining newly generated primary keys during save
Hello, list I'm trying to get primary key value from one enterprise object to get stored in another table. But if the object is recently inserted it does not have any primary key and consequently I have nothing to save. I tried to trigger second tabe initialisation on EOGlobalID.GlobalIDChangedNotification but it seemes too late as changes made at that moment were not saved. I think there should be some solution as if you save several recently created related objects their relationship fields are properly initialised during save with newly generated primary keys. P.S. I do not want to use actual relationships from that table storing pKeys as it is not in fact a part of business logic but something like log and it stores primary keys from different tables in the same field p.p.s. I've seen a piece of code generating primary key before actual save on Wikibooks. I'm not shure, it is a good idea. If some (say validation) error occures on actual save, or if save is simply discarded afrewards, than that pregenerated key would not be emloyed ___ 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: Can not get objectForGlobalID
Thank you! That works. 2008/12/16 Gary Teter big...@wirehose.com: In general you want to use faultForGlobalID for this sort of thing. objectForGlobalID will return null if the enterprise object in question hasn't yet been registered in that particular editing context. faultForGlobalID will properly register the eo in the editing context. On Dec 16, 2008, at 9:50 AM, Gennady Kushnir wrote: Hello list. I can not understand if it is a bug or I am doing something wrong. I am caching EOGlobalID's for a reference table in a static NSMutableDictionary However I noticed that this cache is not working: EOEditingContext.objectForGlobalID returns null but when getting that EO by other means, its GID is just the same as requested one (not simply equals but ==) In fact, sometimes it returns fine. But I can not get the difference... Any ideas? -- The Ent visualization project: http://wirehose.com/research/entvisualization ___ 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
Can not get objectForGlobalID
Hello list. I can not understand if it is a bug or I am doing something wrong. I am caching EOGlobalID's for a reference table in a static NSMutableDictionary However I noticed that this cache is not working: EOEditingContext.objectForGlobalID returns null but when getting that EO by other means, its GID is just the same as requested one (not simply equals but ==) In fact, sometimes it returns fine. But I can not get the difference... Any ideas? ___ 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: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
Hmm... I'm not quite shure in what parts of WO programming it is vital to be thread safe? 2008/7/9 Ken Anderson [EMAIL PROTECTED]: I'm sure Pierre could answer this better than anyone else, but I always lock NSTimestampFormatter when used in multi-threaded situations... On Jul 8, 2008, at 7:03 PM, Chuck Hill wrote: Also note that unlike NSTimestampFormatter, SimpleDateFormat is not thread safe. At least NSTimestampFormatter is not documented to be non-thread safe. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
WOLips Problem Occured
Hello, List I have problems with my Eclipse IDE (3.3.2) with WOLips 3.3.5047 Every time I configure frameworks it shows me Problem Occured error message: } WOLips Include Files Updates } Attempted to beginRule: R/, does not match outer scope rule: P/Rujel I don't get what it means. But as a result those frameworks are not included in classpath files when I ant-build my project... Also I suspect that when I update my frameworks and than run my project it still enployes old frameworks (I wonder where he stores them). For more info: I also include those frameworks projects into my buildPath. Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
SimpleDateFormat vs [Deprecated] NSTimestampFormatter
Hello list! As mentioned in WO 5.4 documentation NSTimestampFormatter class is now deprecated. They recommend using java.text.SimpleDateFormat instead. Pattern formats for NSTimestampFormatter and SimpleDateFormat a different. But when binding WOString and WOTextFiend it still takes patterns for dateFormat in old NSTimestampFormatter style. I want to store and reuse some global setting for date format pattern. But now I have to either use different patterns for WOD bindings and programmatic use or rely on deprecated NSTimestampFormatter and get warnings each time. Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: empty relationship qualifier question
Очень похоже на ошибку в модели. Check your relationship tracks to be toMany is NULL behavior is usually for toOne relationships. 2008/7/8 Michael Bushkov [EMAIL PROTECTED]: Hi, Pierre! Thanks for the answer. I've actually tried using EOKeyValueQualifier(tracks, EOQualifier.QualifierOperatorEquals, NSKeyValueCoding.NullValue). It generates the following sql, which is just wrong: SELECT RTRIM(t0.artist), t0.guitarProSongId, t0.id, RTRIM(t0.title) FROM Song t0 WHERE t0.id is NULL ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
NSTimestampFormatter also understands the SimpleDateFormat pattern symbols. Just use the SimpleDateFormat symbols for both. Does it work only for 5.4 or also for earler versions of WO? Gennady 2008/7/9 Chuck Hill [EMAIL PROTECTED]: On Jul 8, 2008, at 3:59 PM, Gennady Kushnir wrote: Hello list! As mentioned in WO 5.4 documentation NSTimestampFormatter class is now deprecated. They recommend using java.text.SimpleDateFormat instead. Pattern formats for NSTimestampFormatter and SimpleDateFormat a different. But when binding WOString and WOTextFiend it still takes patterns for dateFormat in old NSTimestampFormatter style. I want to store and reuse some global setting for date format pattern. But now I have to either use different patterns for WOD bindings and programmatic use or rely on deprecated NSTimestampFormatter and get warnings each time. NSTimestampFormatter also understands the SimpleDateFormat pattern symbols. Just use the SimpleDateFormat symbols for both. Also note that unlike NSTimestampFormatter, SimpleDateFormat is not thread safe. At least NSTimestampFormatter is not documented to be non-thread safe. Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Versioning ... CVS or Subversion?
Hi' all I've started experimenting with git recently. It required compiling as I'm not on Leopard yet. First I was confused, how to use it with Eclipse - what files from project to include and how to apply patch or rollback if needed (so that eclipse take this action into account). Then I installed eclipse plugin - it did help to add project files to repository and made it handy to review history and update repository. It is good not to add every changed file manually... but is it possible to store entire workspace in single repository? i work on main app and several frameworks simultanously maintaining separate repository for each does not look good idea... 2008/5/15 Robert Walker [EMAIL PROTECTED]: I just scanned though this thread and, unless I missed it, I didn't see any mention of Mercurial (hg for short). I recently stared using hg and have also begun experimenting with git. Both are really great and have some minor pros and cons between each other. But, IMHO either is far superior to SVN for my workflow and development style. SVN for me was a huge step up from CVS, which often made me want to shoot myself trying to resolve conflicts that other team members threw at me on a nearly daily basis. I have always hated the virtual tether that centralized SCM impose. If you not connected to your repository directly, you can't commit your changes. That drove me nuts every time I was working away from the office. Distributed SMS like hg or git make all those headaches go away. I can freely branch, commit, checkout or whatever all completely isolated from any central repository. It's really wonderful. Now for my thoughts on SCM plugins for IDEs: Frankly, I really don't care if they are there or not. I do all my repository work in one of the greatest tools ever invented; the UNIX command line. Nearly all IDE plugins for SCM are limited in a least some way. They don't tend to support everything you really need. The command line is different. Every feature the SMC system has to offer is available and there's no question of the maturity of some plugin. But, that's just me. :-) +2 hg +1 git -1 svn -999 cvs On May 14, 2008, at 2:54 PM, Chuck Hill wrote: On May 14, 2008, at 10:56 AM, Gennady Kushnir wrote: Are they hiring? :-P Russian citizens only. ;-) Ah well... someone wants to spend a workday without Internet? :-o I have an almost endless list of reading, writing, and experimenting that I would like to do. This work thing keeps getting in the way. Chuck 2008/5/12 Chuck Hill [EMAIL PROTECTED]: On May 12, 2008, at 12:23 PM, Gennady Kushnir wrote: P.S. For those who are stunned about lacking internet on the workplace of web-developer =) My web development is not done for them - they don't care about it (so they won't implement repository for me in LAN). They don't much care about my activities there - I could even play games. I just should be on my place in time... well occasionolly someone may need me also... Are they hiring? :-P -- 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 -- 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/robert.walker%40bennettig.com This email sent to [EMAIL PROTECTED] Robert Walker [EMAIL PROTECTED] ___ 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Fwd: Relationship across model boundaries failing
Flattening relationshops (consequently - many-to-many relations) does not work across database (consequently - EOModel) boundaries Unfortunately. It is mentioned in Using EOModeler manual. So you have to traverse relationships programmatically I assume. Gennady 2008/5/29 Juergen Lorenz Simon [EMAIL PROTECTED]: Hi, I'm trying to model a relationship across two EOF Models: Model FirstModel (database name firstmodel) Entity A Model B (database name secondmodel) Entity B Now I have an n:m relationship between the two entities. So in Model FirstModel, I create join tables AB, which has relationships pointing to B. A - AB - B When I try to add or delete objects, the resulting SQL has the wrong table name. Instead of looking to firstmodel.AB, it looks for secondmodel.AB instead! I'm using Project Wonder, WebObjects 5.3 and MySQL. Anyone got an idea what that might be? Cheers, J.L.Simon ___ 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Versioning ... CVS or Subversion?
Are they hiring? :-P Russian citizens only. ;-) someone wants to spend a workday without Internet? :-o 2008/5/12 Chuck Hill [EMAIL PROTECTED]: On May 12, 2008, at 12:23 PM, Gennady Kushnir wrote: P.S. For those who are stunned about lacking internet on the workplace of web-developer =) My web development is not done for them - they don't care about it (so they won't implement repository for me in LAN). They don't much care about my activities there - I could even play games. I just should be on my place in time... well occasionolly someone may need me also... Are they hiring? :-P -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Application became sluggish when deployed on 5.4 [Problem found]
Thanks for jstack idea Though with problems (it refused to run until I found solution in lists and after that generated excepions) it gave me a clue to the problem. It seemes like java.util.prefs library became slow on Leopard. And I access preferences extensively in my app. Luckily I've already made an alternative for it. And when in development mode I did not use prefs. Now I'll exclude it from deployment also. Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Application became sluggish when deployed on 5.4 [Problem found]
Because I have lots of settings. And I don't want giant properties file. I store my settings hierarchically. Now in plist file. Gennady 2008/5/15 Mike Schrag [EMAIL PROTECTED]: java.util.prefs? I'm curious why you're using java.util.prefs instead of just regular WO Properties files? ms On May 14, 2008, at 4:09 PM, Gennady Kushnir wrote: Thanks for jstack idea Though with problems (it refused to run until I found solution in lists and after that generated excepions) it gave me a clue to the problem. It seemes like java.util.prefs library became slow on Leopard. And I access preferences extensively in my app. Luckily I've already made an alternative for it. And when in development mode I did not use prefs. Now I'll exclude it from deployment also. Gennady ___ 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/mschrag%40mdimension.com This email sent to [EMAIL PROTECTED] ___ 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Versioning ... CVS or Subversion?
Hello All. I'm very grateful for your comments. They are very useful and give very interesting information for final choice. I think I'll get unto it as soon as I have time for learning - I think in a few weeks. And I'll make my final decision then. Good integration is quite important for me, but usable model is also very valuable... so now my choice is somewhere between SVN and GIT... I thik CVS is retired - I don't see any advocate... Gennady P.S. For those who are stunned about lacking internet on the workplace of web-developer =) My web development is not done for them - they don't care about it (so they won't implement repository for me in LAN). They don't much care about my activities there - I could even play games. I just should be on my place in time... well occasionolly someone may need me also... and about Internet - it is forbidden there :( Take one, as soon as possible, but to not have any tools is worse than the use of the worst tool. PS: don't worry about your early choice, you can always switch latter on without loosing much of history details (git cvsimport / git svnimport). ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Application became sluggish when deployed on 5.4
Hello list I have an application which should display information from lots of enterprise objects (maybe several hundreds) on single page. When in development mode and when deployed on Tiger Server (WO 5.3.x) (on XServe dual G4) it worked fine with only reasonable lag of about 1 second. But when we upgraded to Leopard (and WO 5.4) my application became inadequately slow and now it takes about 7 seconds to load the same page on the same XServe. What is interesting - when run in development mode on Leopard (WO 5.4) everything works fine. So it is not a problem of generally 5.4 but specifically 5.4 Server. When deployed on experimental Mac OS X Server on my MacBook it also produced unreasonable lag about 3 seconds (of course Core 2 Duo is faster than G4). I tried to diagnose a problem and found that it does not produce bulk of unnecessary SQL requests (monitored by MySQL log) and no load to HDD (as shown by Activity Monitor). But it produces heavy CPU load - so it is all related to some not optimal processes in memory. Any suggestions? Where should I concentrate with debugging? EOF of wo.appserver? Gennady Kushnir ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Application became sluggish when deployed on 5.4
thank you for your answer - it seemes helpful. but i have no idea about neither profiler nor jstack what are they and where i can get them (preferably with some documentation) Gennady 2008/5/11 Mike Schrag [EMAIL PROTECTED]: Any suggestions? Where should I concentrate with debugging? EOF of wo.appserver? If you have a profiler, I would run it under a profiler on OS X Server (which really shouldn't make an difference -- I don't know why it would). You can also jstack it a couple of times during the long pause and see what it's doing during the hang. I would also try putting 5.3 on and see if it hangs, also. 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Broken outline in WOLips component(HTML) editor
When I first installed WOLips I did like that helpful outline of my components HTML structure. It really helps to understand that wild HTML code generated by WOBuilder But later something happend and now ouline shoes me only frames without any titles (regardless of compsct view toggle). This kind of outline is hardly helpful at all. The strange thing is that on some computers it does show and on some - it does not with the same workspace (I work with several computers and have my workspace with me on flashdrive). Can it be corrected somewhere or I should fully reinslall Eclipse? Gennady Kushnir ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Versioning ... CVS or Subversion?
Hello list. I'm thinking about using some versioning system. Trying to decide whether I do need one and if yes - which one. I've heard something about CVS and Subversion. Maybe there is some other... What are advantages and disadvantages of versioning in general and of concrete solutions. I work on Eclipse, I've seen it does support some versioning. Today I just zip my workspace and put it on my flashdrive. As I work both at home and at work I have to synchronise my work. In most cases when i come home I just trash my obsolette workspace and unzip the one I brought from work. But this approach has disadvantages... first - the whole workspace (even zipped) consumes rather much disk space (a lot more than just source codes) so my version repository bosomes very large - when I used xCode it was much more compact as I excluded build folder. and second - if I forget to zip workspace and put it to my flashdrive - than if do something after that - I have to thoroughly merge my work after that. Will versioning sistem help with these problems? Another point is that today I work alone. But maybe in future I will find some collaborator. As i understand - vesioning should help in group work. Interested in your opinions Gennady Kushnir ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Broken outline in WOLips component(HTML) editor
What regads to browser? Mac OS X 10.4.12, Safari 3.1.1 in fact maybe really Safari version does matter. As i have aforementioned problems on macs with Safari 3.1.1 and have no problems with this on macs with not updated Safari Genady 2008/5/11 Mike Schrag [EMAIL PROTECTED]: Can it be corrected somewhere or I should fully reinslall Eclipse? What OS? What Eclipse version? What browser do you use? If Mac, which version of Safari? 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Versioning ... CVS or Subversion?
Thank you all for your opinions. I see all hands are for SVN except built in Eclipse integration. Maybe I should have used google, but could you explain me in general how does versioning work. And how do I work with it. Specifically in regard to WO development. Does it archive only java sources? And how about components, EOmodels and other related resources (which can also have versions)? Another condition is that I don't have Internet connection at work so I can't use online repository and have to merge my homework using flash drive anyway. Does versioning system support this?(and which ones do?) And questions to Miguel: - where I can find that very good open source book that documents everything ? - I can't imagine versioning system without IDE integration. how does it work? - If you say it is that good with Mac OS X integration and coming really soon - maybe I could wait a bit and start my versioning experience with something really cool? Gennady 2008/5/11 David Holt [EMAIL PROTECTED]: Coincidently there is a new podcast about version control: http://www.macdevnet.com/index.php/shows/mdr/38-mdr/366-mdr007 David On 11-May-08, at 11:23 AM, Oliver Scheel wrote: In fact, CVS was build upon RCS which is already some decades old. The projects where much smaller and the internet was still academic. I worked a very long time with CVS and it would still do the job. Now I only use SVN for my projects, because it's now stable enough and widely spreaded. Yes, SVN solves a lot of issues in CVS. But there are some very bad issues with SVN: A broken CVS repository or working copy can be fixed very easily. With SVN you MUST make backups/dumps with svnadmin! Otherwise it might be easier to rewrite your 10 men year project from scratch ;-) With the switch from svn 1.2 to 1.3 (or 1.3 to 1.4) the format of the working copy was changed, WITHOUT guranteeing backwards compatibility and WITHOUT WARNINGS when accessing an older working copy (sic). If you were not aware of it, you destroyed the states of working copy with one click. In one project we need to use a shared working copy because it was not possible to work on dedicated machines. The svn clients were installed on each client. I don't need to tell you the rest of the story... ;-) Oliver P.S.: And, there is still some magic behind SVN :-) Am 11.05.2008 um 19:43 schrieb Miguel Arroz: Hi! Yes, do DO need a version control system. Zipping and flash drives are an excellent way to burn yourself with mistakes and lossing work. There are some more version control systems, namely GIT. I still didn't look at it. It's the system used to manage the Linux kernel source code, and people say it basically can do anything (which might be good or bad). Specially, merging several code forks seems to be easier than CVS and SVN. Anyway, between SVN and CVS, you want SVN, period! Let's say that, the first time I used a version control system (and that was CVS) I only committed stuff with other people looking over my shoulder to make sure I was not going to screw things up. CVS just doesn't make any sense, at least for me, there are too many things that are not done the way they should. On the contrary, SVN is what CVS should have been. It's clean, it works. The main difference is that SVN considers a version to be the state of all the files tree. IE, you know that version 234 of your code repository means ALL the tree is in the version 234, it's like a snapshot in time. CVS uses a different and independent version number per file, which makes things chaotic. You may have a file in version 25 (because you changed it 25 times) and another file in version 3 (you changed it 3 times) that were actually added to the rep at the same time. It just doesn't make any sense, again, at least for me. Also, SVN has a very good open source book that documents everything. About IDE integration and software, I don't use the eclipse plugins, because I'm lucky enough to be a alfa-beta-whatever-user of a new GUI for SVN that is coming on for Mac OS X really soon now, and that I simply love. But I can't talk about that right now or I'll be killed. Yours Miguel Arroz On 2008/05/11, at 14:33, Gennady Kushnir wrote: Hello list. I'm thinking about using some versioning system. Trying to decide whether I do need one and if yes - which one. I've heard something about CVS and Subversion. Maybe there is some other... What are advantages and disadvantages of versioning in general and of concrete solutions. I work on Eclipse, I've seen it does support some versioning. Today I just zip my workspace and put it on my flashdrive. As I work both at home and at work I have to synchronise my work. In most cases when i come home I just trash my obsolette workspace and unzip the one I brought from work. But this approach has
Re: Portal suggestions?
Take a look at Google Apps In corporate version you can integrate them with your local infrastructure using GoogleAPI and SSO services Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to get rid of ?wosid=
Yes, I do create session And I repeat once again : it is not expected behavior for WOHyperlink to append ?wosid to href-bound instances In 5.3 there were no wosids Gennady 2008/5/4 John Huss [EMAIL PROTECTED]: You must be creating a session accidentally somewhere. There is a method in Application that you can override to check when the session is being created. I think it's something like createSessionForRequest, but you should be able to find it. If you can eliminate the session creation, that should take care of it. John ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Problem on WOLips
Did you force your application to generate UTF8 responses in constructor? ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
How to get rid of ?wosid=
Hello list I have problems moving from WO 5.3.1 to WO 5.4.1 I have something like a collection of bookmarks in my application. So I'm accessing them via WOHyperlinks with href bindings. Whereas it did work fine in 5.3 in 5.4 is begun to append ?wosid to all the URLs. Again: WOHyperlinks are initialized with href binding. Not action nor directAction. Why does it append that ?wosid ???!!! As a result in some cases these URL render unusable with that useless suffix... Maybe there is some property I should set? Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Compiling WO project in Xcode 3
Hello list. Moving my WO 5.3 projects to WO 5.4 some issues raised (I suppose everybody knows about them). So i decided to move my projects to Leopard machine with Xcode 3 and WO installed and debug all these issues so that I could run my app on Leopard server. As I know Xcode does not allow to create new WO projects but should be able to work with existing projects. But when I tried to build and my project I bumped into ClassLoadedException: Application class not found When I had a look at build results i astonishingly found that inside woa bundle there are no Resources nor WebServerResoures folders. But they are replaced with one of the files that should have been inside them... Instead of Resources folder there is WOAfile.icns (named Resources) and named WebServerResources - one of my png images in project. Certainly it seemes absolutely impossible to run that project... Does anybody know what is wrong and what I should do to build and run old WO project on Xcode 3? I have OS X 10.5.1 and Xcode 3.0 , WO 5.4 and project initially built on OS X 10.4.11 , Xcode 2.4.x , WO 5.3.4 P.S. I know that my future way is to Eclipse, but I don't have enough time now to learn new IDE today. Moreover I don't need to DEVELOP on Leopard right now my task is only to fix WO 5.4 specific bugs. Thanks in advance, Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Generating HTML without WORequest
thank you for that. it seems to fit. another question is concerned generating multiple responses. because i need to sent multiple unique emails (maybe several hundreds) at one transaction. the problem is that when WOComponent generates response WOContext gets initialized with this response. do i need to create new context for each email (that is separate WOResponse) or it is possible to create multiple responses in single WOContext? 2007/12/15, Rudi Angela [EMAIL PROTECTED]: I tackled the same problem using a dummy context: public WOContext dummyContext() { WOApplication app = Application.application(); String dummyUrl = app.cgiAdaptorURL() + / + app.name() + .woa/wa/dummy; WORequest request = app.createRequest(GET, dummyUrl, HTTP/1.0, null, null, null); WOContext context = app.createContextForRequest(request); context._generateCompleteURLs (); return context; } ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Direct Actions in 5.4
your DirectAction class should be in anonymous package. otherwise url will be like wa/my.package.DirectAction/welcome anyway if you are experimenting just try adding to your Main page a hyperlink to that welcome action (using WOHyperlink dynamic element) and see what url it renders into and how this url will work 2007/12/16, Thierry Kramis [EMAIL PROTECTED]: I did try lowercase. no luck on this. Am 16.12.2007 um 14:16 schrieb Pascal Robert: You have to respect the case, so it's /wa/welcome (lower case w) Hi all I'm working on my first Direct Actions and on WO 5.4. I added an action welcomeAction() to DirectAction that returns a page Welcome (a component file). When I call that action using url/wa/Welcome I get Unable to find framework named Welcome. What am I missing here? Regards Thierry ___ 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/genkush%40rujel.net This email sent to [EMAIL PROTECTED] ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Fwd: Generating HTML without WORequest
Hello, ListI need to sent e-mail from my application. Currently I'm studying JavaMail package - it's not very simple but the question is WebObjects-related. The message body should be generated from WOComponent. But I don't know how to make WOComponent generate HTML. The only way I know to make HTML from WOComponent is generateResponse() and appendToResponse(WOResponse,WOContext). (Which one is better by the way?) But both of them work in context of request-response loop. Sending mail is to be scheduled - so when performing the task I don't have WOContext - it is not initialised with WORequest - because there is no request when in scheduled action. The question is : How can I generate HTML from WOComponent without WOContext or how to get WOContext not in R-R loop. Gennady Kushnir ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Which way is more efficient to get particular EOEnterpriseObject
Hello, List It is not an unresolvable problem. However I just want to perform tasks in the most efficient way. I have a to-many relationship, which points to rather large (about 100) heap of objects. I need to get one of these objects - which one depends on some other attributes of one (or get null if there isn't one that match). And I have to take them that way one by one and possibly do that with all of them. This is done while placing info from these objects to the appropriate place on page. In fact I have something like multidimensional (3) array of objects. The question is - which method for performing that task is the most efficient in WebObject framework? Ideas I have so far: - cycle through array (which I get from relationship attribute), checking if attributes match - construct EOQualifier and filter the array with it - just fetch required object regarding mentioned relationship as just one of attributes involved - index that array converting it into actual multi-dimensional as mentioned above (using pure Java multidimensional arrays or nesting NSArrays/NSDictionaries) Sorting wil not do as the order in which objects will be needed is uneasy to predict Also this is not immutable and other objects into the array may appear - so I want to have them on their place immediately. Regards, Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Which way is more efficient to get particular EOEnterpriseObject
With a hundred objects, that is quite okay. If you have to do it multiple times, it might be an idea to convert it into a dictionary and base the keys on the attributes you're looking for - if that is doable. You haven't given enough information here. In fact, building a dictionary - it is what I ment by indexing. Maybe that's not correct to call it so. - just fetch required object regarding mentioned relationship as just one of attributes involved If your array grows to a size that a linear scan or a building a hashtable (dictionary) is to expensive, a database roundtrip might be the fastest way if you can use indexes for everything. Only for that HUUGE arrays? I thowght, that caching of objects, that EOF do shoud significally speed up fetches... Will it do real database roundtrip for fetching an object that's already cached in memory? (I know it is, as it is in that array in relationship attribute) And the other thing is: implement it in the easiest possible way, so you don't waste resources on it and see whether it is actually too slow. Never optimize anything that doesn't need optimization. Use the simplest code you can write to get the job done and optimize only, if that is too slow. Developer time is normally much more expensive than CPU time. Thank you for that advice, I'll take it into accont )) In fact when I'm trying to opimise I optimise both CPU and developer time. In this particut=lar case - it would be much easier to utilise a structured hashtable than to write a cycle or qualifier each time I mant to get something from that unstructured array. Thank you all who replied. I think I'll buld a hashtable on demand (when this kind of query is first required). Gennady ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: help with mysql
You should insert into the beginning of your dump file the statement pointing its encoding:SET NAMES utf8; Regards,Gennady Kushnir On 19.08.2006, at 16:05, Gino Pacitti wrote:Hi allI have a database with 5 different languages used for products in different tables.I did a mysql dump and loaded that into a new database on new machine - all the foreign charaters are weird now...how can I get a correct set of characters?Gino___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/genkush%408ka.mipt.ruThis email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: EOUtilities.primaryKeyForObject
Hi, I've bumped into this several times. The problem is that enterprise objects do NOT have any primary key right after creation until they are saved into database. So when you create new instance of enterprise object (new record into database) you should run EditingContext.saveChanges() before you can access the primary key of you object. Regards, Gennady Kushnir On 13.07.2006, at 13:46, David Griffith wrote: Hi all, In an application that has been working great for a long time, suddenly I am getting this error: [2006-07-13 11:19:22 CEST] WorkerThread1 java.lang.NullPointerException at com.webobjects.eoaccess.EOUtilities.primaryKeyForObject (EOUtilities.java:834) at Customer.custID(Customer.java:46) at EditCustomer.saveChanges(EditCustomer.java:94) This is when the Customer class is attempting to get the Primary Key for the current record. On further investigation I have realised that the Customer object is not being saved at all, it appears as though it is unable to get a Primary Key for the record as it saves it. The EO_PK_TABLE appears fine and all other tables save with no problem. I wonder does anyone have any idea where I should look to find the problem, I have checked everything and it all looks as it did before. Kind regards, 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/genkush% 408ka.mipt.ru This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: why the new sessions created when there is nobody accessing the application ?????
I assume, making your first (login) page DirectAction should help. If session is not created until successful login, no spiders/surfers may disturb your app. Regards, Gennady Kushnir On 26.05.2006, at 21:41, Helen He wrote: On May 26, 2006, at 12:00 PM, Chuck Hill wrote: Override dispatchRequest in Application and log the URI and headers from the request. That should show what is creating the sessions. I am definitely going to try this one. Thanks! Helen ___ 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 archive@mail-archive.com
Re: auto-zip on upload
To deal with low UP bandwidth uploaded file should be compressed on the client side. So that is NOT server-side WO app's affair.Server-side affair will be to decompress incoming zip file. java.util.zip package will help with that task.I've implemented unzipOnTheFly upload behavior on my app. If you need it - I may send you reusable component, I made. Regards,Gennady Kushnir On 27.05.2006, at 1:49, Randy Wigginton wrote: I’ve created a few pages that use the file upload feature. It works great, I have no problems, but I’d like to make it better if I can. Is it possible to zip the file as it is being sent up to the server? Sometimes the files are quite large, and most users do not have the same bandwidth UP as they do DOWN. Has this already been done, or is this just wishful thinking? ___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/genkush%408ka.mipt.ruThis email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: generating response in different thread
I'm sorry but it is not an answer but a question. Were the documentation for WOLongResponsePage can be found? It is not descripted neither in WO API nor in reference. And there are several other WOExtensions that seem useful but are not documentated. Regards, Gennady Kushnir On 25.05.2006, at 19:47, Christian Pekeler wrote: I have a bunch of pages that can take a long time to generate. I'd like to show a WOLongResponsePage in the interim. The typical way of using WOLongResponsePage is to run the business logic or whatever is taking a long time in a different thread (kicked off by WOLongResponsePage.performAction()), and once done, generate the final page with the result of that expensive computation (with WOLongResponsePage.pageForResult(Object)). ___ 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 archive@mail-archive.com
Re: File Upload and LongRequest
I failed with this idea. It can't resume uploading. Just all or nothing. Regards, Gennady Kushnir On 14.04.2006, at 14:52, Amedeo Mantica wrote: hello! is possible to handle a file uploading with a LongRequest showing the upload progress status? Thenks Amedeo ___ 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/genkush% 408ka.mipt.ru This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: Calendar to add events, reminders etc
take a look athttp://wocode.comthere is variety of solutions for many needs. including calendars.Regards,Gennady KushnirOn 09.03.2006, at 5:09, Jim Wong wrote:anyone have any idea how to make a calendar like iCal of .mac? or is there any third party js, java which i can use? but the data for events needs to be stored in the EO entity which can be created. please advise. thanks. Warmest Regards,Jim Wong[EMAIL PROTECTED] ___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/genkush%408ka.mipt.ruThis email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: unkown exception
The ultimate resolution to most sensless problems like this is Clean all targets (in menu under build button, when hold for a second or two). especially - for WO 5.3.x or even more radical method is to delete build folder in your project folder. Gennady Hey everybody, I've got a hard one. I've started to get these unknown exceptions in my project. I'll edit the file, build and go, and the application doesn't seem to see the keys and actions that I added to the files. It also suddenly seems to periodically not see keys that have been in file and working fine for months. I've included the text from the exception below. Any advice would be greatly appreciated. Thx, Zac ___ 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/genkush%408ka.mipt.ru This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Re: how to set value?
hello if you have created custom class OpportunityCompany.java then look into this .java file to see which datatype is taken as attribute for setPrimaryCustomer(). Most possibe is Boolean or Number. These are wrapper classes while true and 1 are primitive data types. You should use Bootean.TRUE or new Integer(1) if you haven't created that custom class, you can't use method setPrimaryCustomer() as there isn't one. then you should use universal method, applicable in any case: takeValueForKey(Boolean.TRUE , primaryCustomer ); Regards, Gennady in my OpportunityCompany entity, i have an attribute primaryCustomer. this attribute is of external type boolean, and value class(java) Number. Therefore it's setPrimaryCustomer() in the java file is a Number data type. but i can't seem to pass a 1 or true to it when i try aOpportunityCompany.setPrimaryCustomer(1) or aOpportunityCompany.setPrimaryCustomer(true). So how can I do it? Warmest Regards, Jim Wong [EMAIL PROTECTED] ___ 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/genkush%408ka.mipt.ru This email sent to [EMAIL PROTECTED] ___ 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 archive@mail-archive.com
Using information from LDAP, JNDI adaptor
Hello, list. In the applicatin i'm planning to create i want to use LDAP (eDirectory) to manage user login and access privileges to modules and objects of my WO App. As i understand JNDI adaptor is intended to deal with LDAP. However i can't find any usable manual how to use LDAP and JNDI in WebObjects. The only useful thing i saw was authentication using LDAP (in Practical Web Objects). But it had nothig to do with JNDI. I think if JNDI option was included in WebObjects dialogs (when creating EOModel) there should be some instruments to work with it. Did any of yoiu have any experience with this point or maybe you could point some useful URL. Thanks in advance. Gennady Kushnir ___ 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 archive@mail-archive.com