[egenix-users] Help! - mxODBCZopeDA 1.0.9 breaks my Zope 2.8.1
Daniel W. Adair
danny at asterisk.co.nz
Tue Aug 16 17:09:23 CEST 2005
Hi there!
After migrating from Zope 2.7.0 to 2.8.1, my mxODBCZopeDA connections
don't work anymore!
System before migration:
- Debian Sarge
- Python 2.3.3
- Zope 2.7.0
- iODBC
- mxODBC, mxODBCZopeDA 1.0.8 (licensed)
(btw, the connection is to an Informix database)
Migration:
- Zope 2.8.1 needs Python >=2.3.5 so installed Python 2.3.5 with apt-get
- Built Zope 2.8.1 from source using Python 2.3.5
- copied directory "mx" over to new Python and "mxODBCZopeDA" over to
new Zope
- Debian Sarge ships the UCS4-build of Python 2.3.5 (copying of "mx" in
the previous step showed an error message), so I installed
mxODBC(ZopeDA) 1.0.9, as it says on the website.
- Everything else unchanged.
- Started Zope, reindexed catalog instances (see Zope 2.8.1/CHANGES),
everything seemed to be fine. No errors in event.log.
Issues:
Let me mention that everything else works fine, it's just the mxODBC
connections that are broken.
After experiencing below problems, I deleted all mxODBC database
connection objects and restarted Zope.
It has no problems at all without these objects! But as soon as I add one...
I can reproduce the following, as often as I like, from scratch:
- Go to ZMI, add "eGenix mxODBC Database Connection" object to a folder:
Set id "Test", set title, set (proper) connection string, tick "open",
leave rest as default, click "Create Connection"
- Object is created without problems. Connection is open, "Test" tab
works fine.
- Restart Zope (!)
- Go back to ZMI folder where connection object was added
- First indication: The title of the connection object now reads "eGenix
mxODBC Database Connection" instead of the given title.
- Click on the connection object in the ZMI brings:
------------------------------
Traceback (innermost last):
Module ZPublisher.Publish, line 113, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module App.special_dtml, line 175, in _exec
Module DocumentTemplate.DT_Util, line 196, in eval
- __traceback_info__: options
Module <string>, line 0, in ?
AttributeError: 'NoneType' object has no attribute 'get'
------------------------------
- I manually entered "manage_UndoForm" and can confirm that the above
error comes on both "Status" and "Properties" tab. Seems like "options"
isn't set.
- When I create a script which takes the connection object and prints
its "title_or_id()", I get "eGenix mxODBC Database Connection (<font
color=red> not connected</font>)". If I make it print
str(connection.options), I get "None" --- just like the management
screens seem to think.
- The connection is not open, ZSQL Methods don't find it, and if I now
add a _new_ connection object to the same folder, it has the same
problem straight away!
- If I add a new _folder_ and then a new connection inside that folder,
I can access it. After a Zope restart, those connections are broken, too.
- Please don't forget: All other objects are fine. If I delete the
connections and restart Zope, everything (else) is fine.
- The first time I started Zope after the upgrade I got
------------------------------
2005-08-16T13:33:02 ERROR ZODB.Connection Couldn't load state for None
Traceback (most recent call last):
File "/opt/Zope-2.8.1/lib/python/ZODB/Connection.py", line 704, in setstate
self._setstate(obj)
File "/opt/Zope-2.8.1/lib/python/ZODB/Connection.py", line 742, in
_setstate
p, serial = self._storage.load(obj._p_oid, self._version)
File "/opt/Zope-2.8.1/lib/python/ZODB/FileStorage/FileStorage.py", line
548, in load
pos = self._lookup_pos(oid)
File "/opt/Zope-2.8.1/lib/python/ZODB/FileStorage/FileStorage.py", line
516, in _lookup_pos
raise TypeError("invalid oid %r" % (oid,))
TypeError: invalid oid None
------------------------------
when trying to access the (BTree)folder which contained the connection
object. This problem is gone since I deleted the connection objects.
Altogether I have two connection objects in two different locations
using the same connection string.
Zope restarts are needed sometimes.
For some reason still unknown to me, Zope starts hanging and I have to
manually kill it (Note: this doesn't happen and is not necessary when
the mxODBC connection objects are gone).
But restarting breaks my objects, so I'm back to being screwed.
Has anyone have similar experiences?
Where can I look for a solution?
It seems to me like something that needs to be persistently stored in
the ZODB isn't...
Was mxODBCZopeDA thoroughly tested with Zope 2.8.1 and the new ZODB version?
This is for a client, and they need to use the database connection every
day (including today :-().
Please help.
Cheers,
--
Danny W. Adair
Software Developer
Asterisk Ltd
New Zealand
Talk: +64 9 302 1777
Fax: +64 9 302 1772
Write: dannya at asterisk.co.nz
Browse: www.asterisk.co.nz
Visit: Level Four, Newcall Tower, 44 Khyber Pass Rd, Auckland
Post: PO Box 108018, Symonds St, Auckland
Asterisk
Linux solutions - simple, brilliant, secure.
More information about the egenix-users
mailing list