[Zope] Resolving ConflictError
I've recently encountered my first ConflictError. I am hosting multiple sites in this ZODB, and each of them is using a LDAPLoginAdapter as an acl_users: Traceback (innermost last): Module Zope2.App.startup, line 167, in zpublisher_exception_hook Module ZPublisher.Publish, line 120, in publish Module Zope2.App.startup, line 233, in commit Module transaction._manager, line 84, in commit Module transaction._transaction, line 381, in commit Module transaction._transaction, line 379, in commit Module transaction._transaction, line 424, in _commitResources Module ZODB.Connection, line 462, in commit Module ZODB.Connection, line 495, in _commit ConflictError: database conflict error (oid 0x013b3f, class Products.LDAPLoginAdapter.LDAPLoginAdapter.LDAPLoginAdapter) Once this error started occurring on one of the acl_users, I've now seen it on several of them. The websites are still useable, as this error only occurs several times per day, out of ~100s of requests. Searching on google, however, doesn't really give me too much insight into figuring out what my next step is. I'd obviously like to figure out what code is causing the ConflictError, and how I can get rid of it and/or fix the code that is causing it. I've read enough from google searching to familiarize myself with the fs* tools (fsrefs, fsdump), but I'm not sure where to go from there. Thanks in advance, John Ziniti ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope-2.8.1, LocalFS, and the importance of _p_jar
I've encountered the issue described here: http://mail.zope.org/pipermail/zope/2005-August/161120.html on a recently upgraded Zope using LocalFS. I have tracked down the issue to the fact that the object that LocalFS "hands" to ZODB is a WrapperObject, and this object does not have an oid. This raises an AssertionError during the _commit method of ZODB.Connection. I have traced the code a little bit and I see that this block of code will be avoided for these objects if the objects do not appear in self._registered_objects, which I can achieve by making sure that the object has no _p_jar attribute. If I comment out the line in the LocalFS object where the wrapper object's _p_jar is set to the parent object's _p_jar, everything works fine, with no (apparent) problems. [ I tried also setting obj._p_oid = self._p_oid, but then Zope has pickling problems trying to pickle instances of the wrapper class ]. The problem I have with my "solution" is that I have no clue what _p_jar is. What is _p_jar used for within the Zope model? What are the implications of having an object with self._p_jar=None? What are the implications of a transient object (not stored in the ZODB but on the local filesystem), with self._p_jar=None? Thanks in advance for any information, John Ziniti ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Hard-coded "Content-type:text/xml" as xmlrpc in Zope (2.8.1)
Back in June 2004, I had the following problem: http://mail.zope.org/pipermail/zope/2004-June/151436.html http://mail.zope.org/pipermail/zope/2004-June/151492.html http://mail.zope.org/pipermail/zope/2004-June/151497.html http://mail.zope.org/pipermail/zope/2004-June/151498.html which came about because HTTPRequest.py was hard-coded to assume that any request with a Content-type of "text/xml" is an xmplrpc call and handles the request as such. I resolved this issue with the help of [EMAIL PROTECTED], who gave me the XmlFix product, which monkey-patches the HTTPRequest.processInputs method to respond a bit more appropriately. We noted in the thread that although Zope's behavior is broken, it is unlikely to change for historical reasons. I am fine with this and felt comfortable with the simplicity and supportability of the monkey-patch. This monkey-patch was no longer effective recently when I upgraded our Zope instances to 2.8.1. Zope-2.8.1 now additionally has the zope.app.publication. HTTPPublicationRequestFactory class, which also assumes that "text/xml" means xmlrpc (in fact, it assumes that anything that startswith('text/xml') is an xmlrpc call). Not fixing old code which acts in strange hard-coded ways is something I understand, but adding new code that also acts that way seems like it is getting further away from "good" :) Can anything be done to change the behavior in the HTTPPublicationRequestFactory so that it is not so obtuse? My monkey-patch now has to munge two methods to make xml uploads work and I am less happy with it than I was before. Thanks for your time, John Ziniti ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LDAPUserFolder at Zope root
Oscar Figueiredo wrote: I tried the dummy way : delete the acl_users with an intent to instanciate a LDAPUSerFolder afterwards but that locked me out in a way I could do nothing You need to log in as the emergency user, delete the old acl-users, instantiate the new LDAPUserFolder, and then logout and log in again as someone from the LDAPUserFolder who has Manager privileges (just make sure that such a user exists!). If any problems ever arise with the LDAPUserFolder, you'll need to log in as the emergency user in order to fix them. HTH, JZ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Session Variable Error
Asad Habib wrote: Actually, it does exist as I mentioned in my original message. If it did not exist, then would yield a value of None for it. Also, if this were the case, then simply changing the name of the variable would not solve the problem. I think that Andreas is pointing out an inconsistency in your original post, and you should check and make sure that the inconsistency does not actually exist in your program. First you indicate that you set a variable called "undergradProjectsDirected": I declare using the following syntax: But then you indicate that you are using the following to add items: I am using the following statement to append items: Notice that this time you are using "undergraduateProjectsDirected". Please check and then indicate whether this is true in your actual program. Obviously, if you are goign to change the name of the variable, you have to be consistent. Andreas is just indicating that perhaps you haven't been careful to ensure this. HTH, JZ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )