Re: [Webware-discuss] Consolidating the infrastructure
Agree, seems like many projects are moving to Github. And I add my thanks to you for maintaining the Webware project. On Saturday, November 28, 2015 1:14 PM, Chuck Esterbrookwrote: Sounds good. -Chuck On Sat, Nov 28, 2015 at 11:09 AM, Steve Schwarz wrote: Hi Christoph,Sounds like a great idea. Thanks for maintaining this project! Best Regards, Steve Blogs: http://agilitynerd.com/ http://tech.agilitynerd.com/ Dog Agility Search: http://googility.com/ Dog Agility Courses: http://agilitycourses.com/ http://www.facebook.com/AgilityNerd On Sat, Nov 28, 2015 at 12:54 PM, Christoph Zwerschke wrote: Btw, is anyone against moving Webware to Github, consolidating all the infrastructure (we still have our own server with web site, Wiki, SVN, plus the SF page with mailing lists and discussion forums)? It makes no sense that we have 3 mailing list plus various discussion forums on SF. I also want to consolidate all of the docs and Wiki content, probably using Sphinx, and then make it available on Readthedocs. (Not immediately, but some time in winter, when I have time and it's cold outside.) -- Christoph -- ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Webware times out on WebFaction Hosting service
- Original Message - From: Christoph Zwerschke c...@online.de To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Cc: Sent: Monday, July 25, 2011 12:51 PM Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service Am 25.07.2011 21:11 schrieb Roger Haase: Thank you Christoph, the problem was indeed different Python versions. All is working now. Regarding the docstring and adapter.address file, I think the least confusing route would be to fix the docstring and add Host and AdapterPort lines to the WSGIAdapter.config (etc) files. Ok, thanks for the feefback, it's already fixed in the trunk now. If you have any other issues with 1.1b1 let me know since I plan to release 1.1 final this weekend. -- Christoph -- Sounds great. As stated earlier, I have been running 1.1b1 for some time on Ubuntu 10.04, 11.04 and and my test system is on Windows 7. Thanks again for your help. Roger Haase -- Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Webware times out on WebFaction Hosting service
- Original Message - From: Christoph Zwerschke c...@online.de To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Cc: Sent: Sunday, July 24, 2011 11:08 PM Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service Am 25.07.2011 00:36 schrieb Roger Haase: I have some progress. I think the WSGIAdapter.py has a bug -- I couldnot use a non-standard port on Ubuntu 11.04. Just had a look and noticed that I actually removed the adapter.address file config option in r8114 on purpose, probably because you can do the same with WSGIAdapter.config. I just forgot to remove its mention in the docstring and had WSGIAdapter.config spelled wrong. Not sure if I should remove it in the docstring now or reinclude the support for the adapter.address file. Do you think it's worthwile? Note that I made some small fixes to the WSGIAdapter after 1.1b1, the current version is here: http://svn.w4py.org/Webware/trunk/WebKit/Adapters/WSGIAdapter.py But I don't think they have to do with your bad marshall data error. Could you post a traceback of that error? I guess it's thrown somewhere in receiveDict. One possible problem could be that your WSGIAdapter.py file runs with a different Python version than your ThreadedAppServer. -- Christoph -- Thank you Christoph, the problem was indeed different Python versions. All is working now. Regarding the docstring and adapter.address file, I think the least confusing route would be to fix the docstring and add Host and AdapterPort lines to the WSGIAdapter.config (etc) files. Thanks for your help! Roger Haase -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Webware times out on WebFaction Hosting service
- Original Message - From: Roger Haase crosseyedpeng...@yahoo.com To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Cc: Sent: Saturday, July 23, 2011 4:57 AM Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service - Original Message - From: Christoph Zwerschke c...@online.de To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Cc: Sent: Saturday, July 23, 2011 2:20 AM Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service Am 23.07.2011 07:05 schrieb Roger Haase: I have added a WebFaction Custom app (listening on port) to obtain a unique port number. Then I modified my wsgiadapter to point at 184.172.207.73:41759 and modified the app serverconfiguration to listen at the same address. Which Webware version are you using? Webware normally connects to Apache via mod_webkit; only the last beta supports mod_wsgi. -- Christoph -- I have been running Webware 1.1b1 with the mod_wsgi adapter since May, 2010 on Ubuntu 10.04 and Ubuntu 11.04. The Python version is 2.7.1 on Webfaction. I will start over with a clean installation of Webware and give the mod_webkit adapter a try if the problems with wsgi continue. Chuck and Christof, thanks for your thoughts. Roger Haase - I have some progress. I think the WSGIAdapter.py has a bug -- I could not use a non-standard port on Ubuntu 11.04. I copied a few lines of code from CGIAdapter.py to read adapter.address and pass on the host and port. My Patch: diff -r 326014bd2b8f WebKit/Adapters/WSGIAdapter.py --- a/WebKit/Adapters/WSGIAdapter.py Sun Jul 24 14:37:54 2011 -0700 +++ b/WebKit/Adapters/WSGIAdapter.py Sun Jul 24 14:52:42 2011 -0700 @@ -7,7 +7,7 @@ This script expects to find a file in its directory called 'adapter.address' that specifies the address of the app server. If the address file is not found, the address is taken from -the configuration file called 'WSGIAdapter.conf'. +the configuration file called 'WSGIAdapter.config'. Contributed to Webware for Python by Christoph Zwerschke, 04/2010. @@ -55,6 +55,11 @@ def __call__(self, environ, start_response): The actual WSGI application. err = StdErr(environ.get('wsgi.errors', None)) + host, port = open(os.path.join(self._webKitDir, + 'adapter.address')).read().split(':', 1) + if os.name == 'nt' and not host: + host = 'localhost' # MS Windows doesn't like a blank host name + port = int(port) try: inp = environ.get('wsgi.input', None) if inp is not None: @@ -73,7 +78,7 @@ environ = dict(item for item in environ.iteritems() if isinstance(item[1], (bool, int, long, float, str, unicode, tuple, list, set, frozenset, dict))) - response = self.getChunksFromAppServer(environ, inp or '') + response = self.getChunksFromAppServer(environ, inp or '', host=host, port=port) header = [] for chunk in response: if header is None: The above works for me on Ubuntu 11.04. I am not sure if the additional code should be moved down within the try statement. I am still working on resolving the WebFaction problem. With the patch applied, I now get bad marshall data errors. This is my first experience with web hosts. There are about 170 other users on my server and nginx is used to give each user their own apache conf file. I suspect nginx has some kind of attachment to my custom port that is causing the problem, but am still looking. Roger Haase if header is None: -- Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Webware times out on WebFaction Hosting service
- Original Message - From: Christoph Zwerschke c...@online.de To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Cc: Sent: Saturday, July 23, 2011 2:20 AM Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service Am 23.07.2011 07:05 schrieb Roger Haase: I have added a WebFaction Custom app (listening on port) to obtain a unique port number. Then I modified my wsgiadapter to point at 184.172.207.73:41759 and modified the app serverconfiguration to listen at the same address. Which Webware version are you using? Webware normally connects to Apache via mod_webkit; only the last beta supports mod_wsgi. -- Christoph -- I have been running Webware 1.1b1 with the mod_wsgi adapter since May, 2010 on Ubuntu 10.04 and Ubuntu 11.04. The Python version is 2.7.1 on Webfaction. I will start over with a clean installation of Webware and give the mod_webkit adapter a try if the problems with wsgi continue. Chuck and Christof, thanks for your thoughts. Roger Haase -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] Webware times out on WebFaction Hosting service
I am a new WebFaction user trying to port an old Webware WebKit application. I have added a WebFaction Custom app (listening on port) to obtain a unique port number. Then I modified my wsgi adapter to point at 184.172.207.73:41759 and modified the app server configuration to listen at the same address. The problem is that the wsgi adapter and app server are not making a connection and the browser always get a timed out error. I started the AppServer manually in a putty ssh terminal the the AppServer starts but shows no indication of receiving a request. The AppServer startup messages include the line Listening for Adapter on 184.172.207.73:41759 and the address.adapter file is created with the same value. My WSGIAdapter.config file includes: NumRetries = 20 SecondsBetweenRetries = 3 Host = '184.172.207.73' AdapterPort = 41759 Any ideas as to what I am doing wrong? Roger Haase -- Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Adapters
I am running the WSGI adapter with 1.1b1 on Ubuntu 10.04 and also using it on a W/7 test system. Works well for me. Roger Haase --- On Wed, 6/30/10, Chuck Esterbrook chuck.esterbr...@gmail.com wrote: From: Chuck Esterbrook chuck.esterbr...@gmail.com Subject: [Webware-discuss] Adapters To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Date: Wednesday, June 30, 2010, 11:54 PM Hi, Which adapters are you guys using to connect Apache 2.x to your WebKit applications? Sound off, please. -Chuck -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] self.response().flush() on 1.1b1 with WSGI
I use a call to self.response().flush() on a couple of long running transactions. With the WSGI adapter on 1.1.b1 the transaction runs to completion, but nothing is transferred until the transaction completes. I haven't tested this with other adapters. Anyone else notice this? Roger Haase -- ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit Threading Error?
--- On Tue, 11/4/08, Christoph Zwerschke [EMAIL PROTECTED] wrote: From: Christoph Zwerschke [EMAIL PROTECTED] Subject: Re: [Webware-discuss] MiddleKit Threading Error? To: Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Date: Tuesday, November 4, 2008, 12:13 PM Roger Haase schrieb: I had to revise your new MiddleObject.py to put the _mk_cacheLock = threading.RLock() statement at the module level rather than in the MiddleObject __init__ method. A new MiddleObject instance is being created with each request so putting the lock inside the object instance does not force single-threading through the readStoreData method. Right. I've put the lock on the class level now in r7581, that should work as well. The MiddleKit test suite does not run for me either. I will look over the 3 other 3 MiddleKit changes in the queue and update them for 1.0Rc1. It will probably take me about 2 weeks to get around to the task. Thanks. Anybody else who wants to brush up MiddleKit a bit before 1.0? -- Christoph I have downloaded the latest version of MiddleObject.py and verified that putting the lock on the class level works for me. Per your previous messages, it looks like you have already processed the 3 other MiddleKit changes in the queue. Thanks for all your help! Roger Haase - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit Threading Error?
--- On Sun, 11/2/08, Christoph Zwerschke [EMAIL PROTECTED] wrote: From: Christoph Zwerschke [EMAIL PROTECTED] Subject: Re: [Webware-discuss] MiddleKit Threading Error? To: [EMAIL PROTECTED], Discussion of Webware for Python including feedback and proposals. webware-discuss@lists.sourceforge.net Date: Sunday, November 2, 2008, 3:14 PM Roger Haase schrieb: My revised solution is to put the lock at the beginning and end of the method. I never used MiddleKit, so I don't know how to test this, but since it looks reasonable I've checked this in anyway, and cleaned up MiddleObject.py a bit. Can you check whether this works for you? http://svn.w4py.org/Webware/trunk/MiddleKit/Run/MiddleObject.py Btw, I was trying to run the MiddleKit test suite, but I get many errors. For instance when running python Test.py MKDelete I get a Lock wait timeout exceeded (this hasn't anything to do with the lock in the patch, I get it also without your patch). Does the test suite run for you? If yes, on what OS, Py and database (driver) version? Also, while we're at it, can you or somebody else have a look at the following MiddleKit patches: http://sourceforge.net/tracker/?group_id=4866atid=304866 There are a handful of other very old open issues here, mostly MiddleKit or other stuff I don't use. If anybody wants to work on these: http://sourceforge.net/tracker/?group_id=4866atid=104866 Ideally I'd like to have a running MiddleKit test suite and most of the issues above solved before releasing 1.0. -- Christoph I had to revise your new MiddleObject.py to put the _mk_cacheLock = threading.RLock() statement at the module level rather than in the MiddleObject __init__ method. A new MiddleObject instance is being created with each request so putting the lock inside the object instance does not force single-threading through the readStoreData method. While doing some more testing, I found that the problem is largely dependent upon Firefox 3. I have a static web page with 12 images and graphs that are generated by individual calls to Webware/MiddleKit. To run the test that creates the conditions for failure, I must restart the AppServer, clear the browser cache, and reload the page. Firefox 3 almost always causes the failure, Safari for Windows and Google Chrome rarely cause the failure, and IE 7 and Opera 9 never cause the failure (so far). The MiddleKit test suite does not run for me either. I will look over the 3 other 3 MiddleKit changes in the queue and update them for 1.0Rc1. It will probably take me about 2 weeks to get around to the task. Roger Haase - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit Threading Error?
--- On Sun, 10/19/08, Roger Haase [EMAIL PROTECTED] wrote: From: Roger Haase [EMAIL PROTECTED] Subject: MiddleKit Threading Error? To: webware-discuss@lists.sourceforge.net Date: Sunday, October 19, 2008, 3:46 PM I last reported this problem back on May 22, 2004. I am not sure what I have been doing different lately, but I have encountered the problem on both my test system and my production system this past month. I have never been able to reproduce this problem at will. The problem last went away with some 0.8x or 0.9x release but has now occurred on 1.0RC1. I think the problem is caused by: 1. a freshly started AppServer 2. a flurry of incoming transactions all trying to access a MySQL table that has not been accessed before. I think I am hitting the problem because my application generates web pages with multiple embedded images that are served by the Webware application. So accessing a web page may create a flurry of transactions, the first has to wait for a disk read, and the second transactions overruns it resulting in duplicate entries in the cache. The abend occurs in MiddleKit/Run/MiddleObject in readStoreData at line 92: assert len(cache) + 1 == len(row) Per the fancy traceback, cache is equal to: [unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime, -- the problem is here, the fields repeat unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime] And row is equal to: (96L, 'MonumentNashRuin_AR-03-09-02-08', datetime.date(2007, 2, 6), 2L, 'RH, GH', '', 8L, 94L, 42L, 2L, datetime.datetime(2007, 9, 18, 12, 44, 3)) I think the solution is to insert a lock around the code that deals with loading the cache the first time a table is accessed. This is my diff from MiddleKit/Run/MiddleObject.py (probably hard to read because of the line wraps). Well, the previous solution worked for the failing transaction, but then I hit another problem on a flurry of 5 transactions that were generating PNG images. The new problem occurred in the same area - MiddleKit/Run/MiddleObject.py method readStoreData on the line: assert 0, attempted to refresh changed object My revised solution is to put the lock at the beginning and end of the method. --- C:\...\MiddleObject.py-revBASE.svn005.tmp.pyTue Oct 21 08:41:35 2008 +++ C:...\MiddleObject.py Tue Oct 21 08:36:16 2008 @@ -5,6 +5,9 @@ from MiddleKit.Core.ObjRefAttr import ObjRefAttr from MiddleKit.Core.ListAttr import ListAttr +import thread # 2002-08-21 rdh +_cacheLock = thread.allocate_lock() # 2002-08-21 rdh + try: # for Python 2.2 object except NameError: @@ -67,6 +70,7 @@ for the same object in order to refresh the attributes from the persistent store. + _cacheLock.acquire() # 2008-10-20 rdh if self._mk_store: assert self._mk_store is store, 'Cannot refresh data from a different store.' if self._mk_changed and not self._mk_initing: @@ -114,6 +118,7 @@ self._mk_initing = 0 self._mk_inStore = 1 self._mk_changed = 0 # setting the values above will have caused this to be set; clear it now. + _cacheLock.release() # 2008-10-20 rdh return self Roger Haase - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] MiddleKit Threading Error?
I last reported this problem back on May 22, 2004. I am not sure what I have been doing different lately, but I have encountered the problem on both my test system and my production system this past month. I have never been able to reproduce this problem at will. The problem last went away with some 0.8x or 0.9x release but has now occurred on 1.0RC1. I think the problem is caused by: 1. a freshly started AppServer 2. a flurry of incoming transactions all trying to access a MySQL table that has not been accessed before. I think I am hitting the problem because my application generates web pages with multiple embedded images that are served by the Webware application. So accessing a web page may create a flurry of transactions, the first has to wait for a disk read, and the second transactions overruns it resulting in duplicate entries in the cache. The abend occurs in MiddleKit/Run/MiddleObject in readStoreData at line 92: assert len(cache) + 1 == len(row) Per the fancy traceback, cache is equal to: [unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime, -- the problem is here, the fields repeat unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime] And row is equal to: (96L, 'MonumentNashRuin_AR-03-09-02-08', datetime.date(2007, 2, 6), 2L, 'RH, GH', '', 8L, 94L, 42L, 2L, datetime.datetime(2007, 9, 18, 12, 44, 3)) I think the solution is to insert a lock around the code that deals with loading the cache the first time a table is accessed. This is my diff from MiddleKit/Run/MiddleObject.py (probably hard to read because of the line wraps). @@ -5,6 +5,9 @@ from MiddleKit.Core.ObjRefAttr import ObjRefAttr from MiddleKit.Core.ListAttr import ListAttr +import thread +_cacheLock = thread.allocate_lock() + try: # for Python 2.2 object except NameError: @@ -78,6 +81,9 @@ if store.setting('UseBigIntObjRefColumns', False): fullClassName = self.__class__.__module__ + '.' + self.__class__.__name__ cache = self._mk_setCache.setdefault(fullClassName, []) + + if not cache: + _cacheLock.acquire() if not cache: allAttrs = self.klass().allDataAttrs() # @@ 2000-10-29 ce: next line is major hack: hasSQLColumn() @@ -88,6 +94,7 @@ setMethodName = 'set' + name[0].upper() + name[1:] setMethod = getattr(self.__class__, setMethodName, '_'+name) cache.append(setMethod) + _cacheLock.release() assert len(cache) + 1 == len(row) self._mk_initing = 1 Roger Haase __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Upgrade to Python 2.4, MiddleKit and DateTime confusion -- Found problem
The DateTime issue was the result of my sloppy upgrade. I failed to copy over the new AppServer, Launch, etc. to my context directory. I have to resolve a few issues with mx.DateTime in my own code, but Webware is now running with the MySQLD-python 1.2 version. Roger Haase --- Roger Haase [EMAIL PROTECTED] wrote: Hi, I am trying to upgrade a Fedora Core 3 installation to Fedora Core 4, converting from Python 2.3 to 2.4 and moving to Webware .9 as part of the process. Fedora Core 3 has been running with the mx utilities and MySQL-python 0.9.2. I am getting an abend when trying to logon to my application: File /home/web/dra/Scripts/SitePage.py, line 257, in respondToPost [edit] self._respond(transaction) File ./WebKit/HTTPContent.py, line 105, in _respond [edit] File ./WebKit/Page.py, line 30, in defaultAction [edit] File /home/web/dra/Scripts/Logon.py, line 79, in writeHTML [edit] user,message = self.processFields(cookieKey) File /home/web/dra/Scripts/Logon.py, line 111, in processFields [edit] user = sqldb.fetchObjectsOfClass('User',clauses='where name=%s' % name) File ./MiddleKit/Run/SQLObjectStore.py, line 346, in fetchObjectsOfClass [edit] File ./MiddleKit/Run/MiddleObject.py, line 104, in readStoreData [edit] File /home/web/dra/db/GeneratedPy/GenUser.py, line 942, in setUpdateTime [edit] raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value)) TypeError: expecting datetime type, but got value datetime.datetime(2005, 12, 22, 10, 34, 53) of type type 'datetime.datetime' instead If I understand this correctly, a User record is in the process of being moved into the Middlekit store, and it is expecting the old mx.DateTime type of type 'DateTime', but the MySQL-python module is passing the Python 2.3/2.4 type 'datetime.datetime'. An idea was to uninstall mx and see what happened next, but yum reported that MySQL-python 1.2 was dependent upon mx and would be uninstalled along with it. Anyone have an idea of what to do to fix this? Roger Haase __ Yahoo! DSL � Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Upgrade to Python 2.4, MiddleKit and DateTime confusion
--- Chuck Esterbrook [EMAIL PROTECTED] wrote: On 12/29/05, Roger Haase [EMAIL PROTECTED] wrote: ... If I understand this correctly, a User record is in the process of being moved into the Middlekit store, and it is expecting the old mx.DateTime type of type 'DateTime', but the MySQL-python module is passing the Python 2.3/2.4 type 'datetime.datetime'. An idea was to uninstall mx and see what happened next, but yum reported that MySQL-python 1.2 was dependent upon mx and would be uninstalled along with it. Anyone have an idea of what to do to fix this? I maintain MiddleKit and I'll help you work through this. Did you regen your MK source code? If so and you still have the problem, can you send me your GenUser.py so I can look at it? I have worked around the problem by uninstalling MySQL-python 1.2 and installed the older MySQL-python 0.9.2. Everything seems to work OK with the older module. I think the problem is incompatible defauts between MiddleKit and MySQL-python 1.2. Given the presence of both mx and Python 2.3+, MySQL-python 1.2 is choosing to use the Python datetime module and MiddleKit is using the mx DateTime. I had regened the MK source code and I have attached the module. The relevant part is the setUpdateTime method at line 936 and the failure is the type check at line 941. Roger Haase __ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/''' GenUser.py Thu Dec 29 12:52:17 2005 Generated by MiddleKit. ''' # MK attribute caches for setFoo() methods _emailAttr = None _nameAttr = None _firstNameAttr = None _lastNameAttr = None _passwordAttr = None _changePasswordAttr = None _changePreferencesAttr = None _jobCodeAttr = None _connectionAttr = None _screenWidthAttr = None _screenHeightAttr = None _colorDepthAttr = None _ipAddressAttr = None _cookieAttr = None _browserNameAttr = None _jscriptVersionAttr = None _tinyImageSizeAttr = None _smallImageSizeAttr = None _mediumImageSizeAttr = None _largeImageSizeAttr = None _jumboImageSizeAttr = None _doubleImageSizeAttr = None _limitImageSizeAttr = None _imageQualityAttr = None _maximumImagesPageAttr = None _surveySequenceAttr = None _wikiIdAttr = None _screenWidthLimitAttr = None _updatedByAttr = None _updateTimeAttr = None _lastLogonAttr = None import types from mx import DateTime from MiddleKit.Run.MiddleObject import MiddleObject from types import InstanceType, LongType from MiddleKit.Run.SQLObjectStore import ObjRefError class GenUser(MiddleObject): def __init__(self): MiddleObject.__init__(self) self._email = None self._name = None self._firstName = None self._lastName = None self._password = None self._changePassword= None self._changePreferences = None self._jobCode = None self._connection= None self._screenWidth = None self._screenHeight = None self._colorDepth= None self._ipAddress = None self._cookie= None self._browserName = None self._jscriptVersion= None self._tinyImageSize = None self._smallImageSize= None self._mediumImageSize = None self._largeImageSize= None self._jumboImageSize= None self._doubleImageSize = None self._limitImageSize= None self._imageQuality = None self._maximumImagesPage = None self._surveySequence= None self._wikiId= None self._screenWidthLimit = None self._updatedBy = None self._updateTime= None self._lastLogon = None def email(self): return self._email def setEmail(self, value): if value is not None: if type(value) is not types.StringType: raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value)) # set the attribute origValue = self._email self._email = value # MiddleKit machinery self._mk_changed = 1 # @@ original semantics, but I think this should be under if not self._mk_initing... if not self._mk_initing and self._mk_serialNum0 and value is not origValue: global _emailAttr if _emailAttr is None: _emailAttr = self.klass().lookupAttr('email') if not _emailAttr.shouldRegisterChanges(): _emailAttr = 0 if _emailAttr: # Record that it has been changed if self._mk_changedAttrs is None: self._mk_changedAttrs = {} # maps name to attribute self._mk_changedAttrs['email'] = _emailAttr # changedAttrs is a set # Tell ObjectStore it happened self._mk_store.objectChanged(self) def name(self): return self._name def setName(self, value): if value is not None: if type(value) is not types.StringType: raise TypeError, 'expecting string type, but got value %r of type %r instead' % (value, type(value)) # set the attribute origValue = self._name self._name = value # MiddleKit machinery self
[Webware-discuss] Upgrade to Python 2.4, MiddleKit and DateTime confusion
Hi, I am trying to upgrade a Fedora Core 3 installation to Fedora Core 4, converting from Python 2.3 to 2.4 and moving to Webware .9 as part of the process. Fedora Core 3 has been running with the mx utilities and MySQL-python 0.9.2. I am getting an abend when trying to logon to my application: File /home/web/dra/Scripts/SitePage.py, line 257, in respondToPost [edit] self._respond(transaction) File ./WebKit/HTTPContent.py, line 105, in _respond [edit] File ./WebKit/Page.py, line 30, in defaultAction [edit] File /home/web/dra/Scripts/Logon.py, line 79, in writeHTML [edit] user,message = self.processFields(cookieKey) File /home/web/dra/Scripts/Logon.py, line 111, in processFields [edit] user = sqldb.fetchObjectsOfClass('User',clauses='where name=%s' % name) File ./MiddleKit/Run/SQLObjectStore.py, line 346, in fetchObjectsOfClass [edit] File ./MiddleKit/Run/MiddleObject.py, line 104, in readStoreData [edit] File /home/web/dra/db/GeneratedPy/GenUser.py, line 942, in setUpdateTime [edit] raise TypeError, 'expecting datetime type, but got value %r of type %r instead' % (value, type(value)) TypeError: expecting datetime type, but got value datetime.datetime(2005, 12, 22, 10, 34, 53) of type type 'datetime.datetime' instead If I understand this correctly, a User record is in the process of being moved into the Middlekit store, and it is expecting the old mx.DateTime type of type 'DateTime', but the MySQL-python module is passing the Python 2.3/2.4 type 'datetime.datetime'. An idea was to uninstall mx and see what happened next, but yum reported that MySQL-python 1.2 was dependent upon mx and would be uninstalled along with it. Anyone have an idea of what to do to fix this? Roger Haase __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
RE: [Webware-discuss] Printing from web application
--- Geoffrey Talvola [EMAIL PROTECTED] wrote: You might try to produce a printer-friendly version of your HTML reports. You can use the CSS style page-break-before: always on a P tag to force page breaks where needed. For instance, if your report consists of a large HTML table, you may determine through trial and error that you can comfortably fit 20 rows on one page. Then split up the table into multiple tables with no more than 20 rows per table and insert p style=page-break-before: always in between each one. This will require a bit of experimenting and tweaking with different browsers to get it right, and it may not always work 100% correctly, but it may be good enough depending on your use case. You can have a view version of the report in which all of the data is contained within one large table for online use, and provide a link to a printable version of the report in which you split up the tables to fit one per page, strip out navigation links, etc. The nice thing about this is that the HTML reports will probably be much nicer to use online than a PDF report would (does anyone actually like viewing reports online using a PDF viewer?). They probably won't look as nice when printed though. I've used this method with some success -- it's not perfect but given the choice between nice-for-printing PDF reports that are a pain to use online, and acceptable-printing HTML reports that are a pleasure to use online, I prefer the second choice. - Geoff If you are using Firefox (and maybe the latest Netscape and Mozilla), there is support for the THEAD, TFOOTER, and TBODY tags. Just by wrapping the heading rows of a table in thead, Firefox will print the heading rows on subsequent pages -- no need to use the page-break-before method on large tables. This, combined with liberal use of dispay: none; under the media print section to eliminate the printing of buttons and other things not relevant on a printed page creates printed output close to perfect. Firefox deserves another plug here; if you are not using Firefox to develop your application's html, you are missing out on some great tools. There are several fantastic developer extensions (click Extensions under the Firefox Tools menu). I use the Web Developer, HTML Validator, and View Formatted Source extensions every day. Roger Haase __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] +1 Attaboy for Mark and Webware 0.9b1
I downloaded the 0.9b1 release and installed it on my W/XP test machine this morning. I looked over the release notes and have lightly tested the release. I only found a couple of nits: 1. The important release notes for WebUtils is rather sparse. 2. Unpacking the tarball with WinZip resulted in a new Webware directory rather than the expected Webware-0.9b1. While this did not effect me and I always rename the directory to Webware, it could accidently overly someone's production copy if they are not careful. Thanks for your work, Mark. This looks like a pretty solid beta. Roger Haase Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] WebKit not compiling
--- Eduardo Elgueta [EMAIL PROTECTED] wrote: Hi All, Suddenly, webkit is not compiling class library files. When I run a servlet that uses this object, it generates an exception pointing to a comment line in the class file! All changes to the class library files are ignored. I have had instances where the formatted dump displays segments of an old code version and points to the wrong line of code, but if I use the failing line number and edit the module, the line number is correct and will always point to the actual line of code that is failing in the current module. Usually I just ignore it and fix my code, but stopping and restarting the AppServer (even though auto restart is on in my test system) always corrects the problem in the next formatted dump. Roger Haase __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit broken or major design change in CVS head?
--- Chuck Esterbrook [EMAIL PROTECTED] wrote: Not to worry. As the author of MiddleKit I also have older projects that I don't want broken (and don't feel like upgrading). Consequently, when I make changes like this, I always add an option to get the old behavior. In this case, the setting is: { 'SQLSerialColumnName': '%(className)sId', } Which goes in Settings.config inside your Foo.mkmodel. Also you may need this one if you don't want object references split into 2 columns (class id and obj id): 'UseBigIntObjRefColumns': 1, Thanks Chuck, that works for me. Roger Haase __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] MiddleKit broken or major design change in CVS head?
The current CVS head for Middlekit now generates and expects the serialNum field for all SQL tables to be called serialNum where before the serialNum field for each table would be called tablename + Id. This breaks a lot of existing code as all SQL tables created with prior versions will not work. Here is a excerpt from a new create.sql written by Generate.py from CVS head: ... create table User ( serialNum int not null primary key auto_increment, deleteddatetime null, firstName varchar(15), lastName varchar(15), password varchar(63), ... And an excerpt from a create.sql made with 8.1 Middlekit: ... create table User ( userId int not null primary key auto_increment, deleteddatetime, firstName varchar(15), lastName varchar(15), password varchar(63), ... Roger Haase __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] MiddleKit Threading Problem
It has been almost two years, but I have once again hit an abend in MiddleObject.py (line 75 in 8.1): assert len(cache)+1==len(row) On my last reported incident, I had been encountering this problem every several months, and the suggestion was made to upgrade to 7.1. That seemed to have fixed the problem until today. I think the problem is caused by: 1. a freshly atarted AppServer 2. a flurry of incoming transactions all trying to access a MySQL table that has not been accessed before. Once the problem occurs, all attempts to access that same table continue to fail until the AppServer is restarted. On my latest abend, clicking the Complete button for the variable cache in the fancy traceback yields the following. Note all the methods are duplicated in this instance, thus, the assert failed. Full representation: [unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime, unbound method Folder.setFileName, unbound method Folder.setSurveyDate, unbound method Folder.setLockUserId, unbound method Folder.setPhotographer, unbound method Folder.setComments, unbound method Folder.setRootId, unbound method Folder.setSiteId, unbound method Folder.setNumberFiles, unbound method Folder.setUpdatedBy, unbound method Folder.setUpdateTime] I think the solution is to insert a lock around the code that deals with loading the cache the first time a table is accessed. At the top of the MiddleObject.py add: import thread # 2002-08-21 rdh _cacheLock = thread.allocate_lock() # 2002-08-21 rdh Then modify the block starting at line 64 to insure only one thread gets to load the cache at a time: if not cache: # 2002-08-21 rdh _cacheLock.acquire() # 2002-08-21 rdh if not cache: allAttrs = self.klass().allDataAttrs() # @@ 2000-10-29 ce: next line is major hack: hasSQLColumn() attrs = [attr for attr in allAttrs if attr.hasSQLColumn()] attrNames = [attr.name() for attr in attrs] assert len(attrNames)+1==len(row) # +1 because row has serialNumber for name in attrNames: setMethodName = 'set' + name[0].upper() + name[1:] setMethod = getattr(self.__class__, setMethodName, '_'+name) cache.append(setMethod) _cacheLock.release() # 2002-08-21 rdh Roger Haase __ Do you Yahoo!? Yahoo! Domains Claim yours for only $14.70/year http://smallbusiness.promotions.yahoo.com/offer --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Choosing a wiki - MoinMoin option
For those of you not familiar with the latest MoinMoin release, version 1.2.1 has been restructured and now runs under Twisted, FastCGI, and ModPython. The Twisted specific code is pretty small. I have intentions of taking a stab at trying to get MoinMoin to run under Webware, but I don't have the time at the moment and my skills are pretty lightweight. The M$ approach to this would be to adapt MoinMoin to Webware and then layer Webware specific features on top of it. For my own Webware application, I have been trying to integrate a wiki into the application. While it presently works well (just running MoinMoin with the old CGI interface), it would be very handy to have access to Webware session variables when writing MoinMoin macros to insert data into a wiki page. Roger Haase __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Re: website: moving forward
--- Shane McChesney [EMAIL PROTECTED] wrote: Any thoughts? What about webware4python.org? It's also available in .com, .net, .ca, .info, .biz, .us ... I would vote for the webware4python.org name if that is available because that is close to the original name. The Webware / Python web application toolkit seems like a lot to say in a logo, especially if you want to say it in a fraction of an inch at the end of a page. Webware / 4 Python would fit better in small places. Just my opinion. Roger Haase __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] RE: [Moin-user] Webware?
--- Nick Trout [EMAIL PROTECTED] wrote: Anyone looking at getting Moin 1.2 working under Webware? Roger Haase What would be the benefits of that? Nick The benefits are likely restricted to a few. In my case, I use MoinMoin as an easy extension to my Webware application for documentation and discussion pages. I have written Moin macros that display images and data from my Webware application on Moin pages and have links on my Webware pages that open new windows for displaying definitions of choices, etc. Current problems include two separate login mechanisms and some sloppy security aspects that I need to mend. Moin has been restructured (in the 1.2 release) and now runs under Twisted, ModPython and FastCGI (was formerly a simple CGI application). If you are not already using Moin and Webware, you will probably not be interested in getting Moin to run under Webware. Roger Haase __ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] ./AppServer stop Fails
The rc script is where? Roger haase --- Ian Bicking [EMAIL PROTECTED] wrote: The WebKit/webkit rc script doesn't have this problem, though you'll have to put the paths in yourself. It's the best way to start the AppServer when you're not doing development. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] ./AppServer stop Fails
Thanks, you helped me figure out the problem restarting after my kill command. I killed the AppServer pid rather than the ThreadedAppServer pid. Roger Haase --- Gary Perez [EMAIL PROTECTED] wrote: I have the same problem on a daily basis. My method to restart the AppServer is to check the appserverpid.txt file in the runtime directory (not the Webware/WebKit) directory, and kill that PID. Then, ./AppServer to start again. I wrote a Python script that will either read that PID file and kill it, or parse the output of ps aux and kill the appropriate PIDs. I can give that to you if you want. You can do it through WebKit, if desired, but should do so through the OneShot.cgi adapter, in case you need to restart the server after it's gone to lunch. This probably doesn't solve your problem, but I hope it helps a bit. -Gary __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] ./AppServer stop Fails
Oh, that WebKit/webkit...! Duh, thanks, looked like a typo. Roger Haase --- Ian Bicking [EMAIL PROTECTED] wrote: In WebKit/webkit, just like I said ;) (Quick now, who's on first) __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] ./AppServer stop Fails
Hi, I am practicing the installation and running of my Webware app on a dedicated remote hosted linux server with ssh and WebMin access. A starting assumption is the way to start the AppServer is to ssh in and start it in the normal manner and then disconnect, leaving it running. Per the docs, I should be able to start another ssh session and issue a: ./AppServer stop This fails in the stop function of AppServer.py trying to: pidfile = os.path.join(os.path.dirname(__file__),appserverpid.txt) ...which points to the WebKit directory. The problem seems to be the recordPID method of AppServer.py stored the PID in the mycontext directory: pidfile = open(os.path.join(self._serverSidePath, appserverpid.txt),w) I was testing with the 8.0 release; the CVS version of AppServer.py seems to have some code changes but the directory mismatch appears to persist. I think the mycontext directory is the right place for the PID file to be stored, but the stop function (as I understand it) doesn't have a way to find the mycontext directory (stop is called from the main function in ThreadedAppServer.py). Using the admin function to stop the AppServer is probably an easy way around this, but I understand the recommendation is to disable the admin functions for production sites. I tried the kill method as well, but that doesn't seem to shut down cleanly and I was unable to restart the AppServer without rebooting. Any suggestions? Roger Haase __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Zope vs Webware (Not Really)
--- Chris Bruce [EMAIL PROTECTED] wrote: I am getting ready to build a large webbased application. I am set on python (still wondering how to make installation easy) and am deciding between Zope and Webware. I have developed many Zope applications, but new to Webware. I am well aware that they are very different and they can't truly be compared. But many things I have read about Webware always mention Non of the Headaches of Zope or something similar. What is meant by this? If it really is an I project and not a we project, I don't think Zope has much to offer you. I tried a while back, but never managed to do anything useful with Zope. To me, Zope seems only appropriate for a large team of developers. The learning curve is pretty steep for one person to climb without someone elses shoulders to stand on now and then. Roger Haase __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
[Webware-discuss] HowTo Restart AppServer and Preserve Session Based Locks
I currently use my SitePage module to hold a shared MiddleKit store and a dictionary which I use as a lock holder for active users who are editing a logical section of a MySQL database. I would like to be able to restart the AppServer: - from a servlet as discussed in another thread recently - automatically by updating a module - from the console How can I save and restore my dictionary lock holder under all of the above instances? Or is there a better technique I could use (like a MySQL table or file instead of a dictionary in SitePage)? Using a file or table would be an easy fix, but I currently detect timed out users by maintaining a last accessed time in the lock dictionary and clearing timed out users whenever a new user tries to obtain a lock. Maintaining the last access time would require rewriting the file/table with each incoming transaction. Is there a better way to detect and remove a timed out user? Roger Haase __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] New documentation: Application Development
From the end of Ian's new doc on Application Development: ''' A basic framework for your SitePage might be: from WebKit.Page import Page class SitePage(Page): def respond(self, trans): if self.securePage(): if not self.session().value('username', False): self.respondLogIn() return def securePage(self): Override this method in your servlets to return True if the page should only be accessible to logged-in users -- by default pages are publically viewable return False def respondLogin(self): #@@ s/b respondLogIn # Here we should deal with logging in... pass Obviously there are a lot of details to add in on your own which are specific to your application and the security and user model you are using. ''' I have managed to create an application that deals with session logins and session timeouts, but have often wondered about the proper way to handle the process. Could you elaborate on the above a bit more? Specifically, doesn't the method respond have to call its ancestor in Page (HTTPServlet)? What does the method respondLogIn do if it discovers the session has timed out or this is the request for a login page rather than an incoming CGI login form? Why did you choose to override the method respond rather than awake as in SecurePage.py in the WebKit Examples? A few lines of SecurePage have puzzled me as well, this from line 40: # Get login id and immediately clear it from the session loginid = session.value('loginid', None) if loginid: session.delValue('loginid') ...and these from line 58: # Check if they can successfully log in. The loginid must match what was previously # sent. if request.field('loginid', 'nologin')==loginid and self.loginUser(username, password): # Successful login. # Clear out the login parameters request.delField('username') request.delField('password') request.delField('login') request.delField('loginid') I have never understood where session.value('loginid') is being set, why it is being deleted if it exists, why the incoming id must match the old value, and what is the benefit of doing request.delField(...). Roger Haase __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit references
--- Chuck Esterbrook [EMAIL PROTECTED] wrote: I added your paper to: http://webware.sourceforge.net/Papers/ http://www.opensky.ca/~jdhildeb/webware/ In Jason's paper and elsewhere in the MiddleKit docs there is some advice on avoiding concurrency issues: ''' Concurrency Issues . . . If it is likely that two users will attempt to manipulate the same object, you may want to implement a locking mechanism to prevent problems from occurring. ''' During some stress testing a few days ago I found that if two servlets are updating or inserting different records at the same time using a single store, then a store.saveChanges() from either of the servlets writes all updated records in the store to the database. So for any updates, it is best to either use unique stores or put locks around the update operations. Not doing so may result in bad things happening, the most noticeable in my tests was an abend in ObjectStore.py when an assert caught a positive serial number in an object which was about to be added to the database. Roger __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit references
--- Jason Hildebrand [EMAIL PROTECTED] wrote: In any case, it would be a good first step to see if it solves your problem, Roger. I can send you a patch, just let me know if you use the 0.7 release or CVS. I fixed the problem by putting a rather brutal lock in ObjectStore, but I would be happy to try your patch and grap a fresh copy of CVS at the same time. I was wondering if a more elegant solution would be to make MiddleKit inserts and deletes commit to the database immediately and offer an update option along the lines of what Ian discussed a while back which would also cause an immediate commit. I am too lazy to find the original, it was a syntax like: row.update(a=1,b=2,c=3...) I am not sure of the performance issues of this, plus or minus, but it would be easier to explain. Roger __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit references
--- Michael Engelhart [EMAIL PROTECTED] wrote: Shouldn't these updates/inserts be wrapped in a database transaction anyway? Wouldn't that avoid the threading issues that are coming up? I have been wrong a lot on MiddleKit threading issues in particular, but I think currently if a servlet is doing: obj.setA(1) obj.setB(2) and some other servlet does a saveChanges between the setA and setB, the obj is committed to the database with only the change to A. A little scary, but a future saveChanges will add the B change. The only way to prevent this currently is a lock on a shared store from before a servlets first .setX until it issues a saveChanges. Without a lock for a shared store, two racing saveChanges can currently grab the same list of changed objects from the store, and the loser discovers that the row it is trying to insert has already been inserted (a great example of the usefulness of assert). If your database transaction has a lock for all updates to a shared store you are OK (not just updates to the same object per the docs), else Jason's suggested change should fix the problem. Roger __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] Documentation format
--- Ian Bicking [EMAIL PROTECTED] wrote: The documentation format discussion kind of died down, but I'd like to do some documenting, and that's one of those fleeting motivations you really have to grab onto ;) Anyway, after looking some at the XML produced by reST, I think the format doesn't imply any great lock-in. And I like writing it, so I'd like to use it. But this effects all the developers who might write documentation, since one of the first things I want to do is rewrite the current WebKit documentation, expanding and checking for accuracy. I'm not planning to do anything too exciting at this point (no doc strings or literate programming or new tools or anything), just trying to get the basic documentation in good shape. Shall I go forward or do we need more discussion about this? Ian At the risk of making the documentation project even harder, it seems to me the best place to create Webware documentation is in a TWiki-like environment because mass participation would be so easy. Having looked over the reStructuredText specs a bit, I rather like it because it seems pretty simple. There has been talk now and then of a Webware based Wiki (a WikiKiti? ;). How difficult/feasible it would be modify your Wikiware code to utilize reStructuredText? Roger __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit Threading Problem - Stage 2
Well, I have been wrong a lot lately... My HTML page had 7 very similar img src=ShowPix?pid=4tn=160 tags trying to display 7 images. The second image succeeded and the other 6 failed. If I had messed up the classes.csv file all seven images should have failed. Also, restarting the AppServer made everything work again. Could have been a memory error, but I doubt it. I will try to figure out what would be useful values to print at that point and wait for the next occurance. Roger On Sunday 21 July 2002 08:36 pm, Jason Hildebrand wrote: Hi Roger, On Sat, 2002-07-20 at 15:45, Roger Haase wrote: I believe I have stumbled into another threading issue, one step further along than the problem of last week. This time it looks like it is in MiddleKit to me. The situation is the same, I have a web page that is trying What makes you think it is a threading problem? via my ShowPix servlet, only the second image displayed correctly, all the rest crashed with error messages similar to: http://www.users.qwest.net/~haaserd/MiddleKit/Error-ShowPix.html I took a look at this error and the corresponding assertion in the middle kit code, and it looks like the number of columns coming from the database doesn't match the number of attributes in the object being fetched/instantiated. Could it be that you've changed your classes.csv file (by adding an attribute to some class) but forgotten to add the column in the database? peace, Jason --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
Re: [Webware-discuss] MiddleKit/MySQL Threading Problem - Solved
Thanks Geoff! I downloaded your fix and by putting in the print statement verified I was getting multiple copies of UnboundMethodError before the fix and only one after the fix. If I understand the problem correctly, the className.methodName(self,...) form of call does a global lookup and the error message was saying it found an instance with the right name, but it was the wrong copy. The self.methodName(...) form does a local lookup and avoided the multiple copy confusion. Roger Haase On Sunday 14 July 2002 10:08 am, Geoff Talvola wrote: I just checked in a fix to Webware CVS. Give it a try. - Geoff On Sun, 2002-07-14 at 12:36, Geoff Talvola wrote: This isn't a Python problem -- it's a bug in Webware. If you put a print statement at the end of UnboundMethodError.py you'll find that the module actually gets imported multiple times. This somehow causes a mismatch between the instances and the classes that triggers the error you're noticing. If you restart the appserver, then use your web browser to directly access the UnboundMethodError servlet, then go to UnboundMethod.html, the error goes away. The images come up fine with no errors as long as the appserver stays running. What this leads me to believe is that there is a race condition in WebKit. If there are multiple simultaneous requests for a servlet that hasn't yet been loaded, the module containing the servlet gets imported multiple times simultaneously, causing various errors. This would persist through the lifetime of the appserver since it never throws away old servlet instances. But if the first access for the servlet occurs in isolation, then the problem is avoided. I'll see if I can add some locking into ServletFactory to solve the problem. - Geoff --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss