[Zope] possible bug in zope 2.4.0/2.4.3 or 2.5.x

Ollas, Marcus mco@loxcom.net
Sun, 31 Mar 2002 22:31:32 +0200


This is a multi-part message in MIME format.

------_=_NextPart_001_01C1D8F3.0BC323F0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Dear sirs,
=20
i'm a software developer from germany and actually writing a web-based
application. This application is based on zope, because in my opinion
zope is perfect for this. I've developed this application as a python
based product, the first version written in dtml was too slow.
Everything has worked fine, till I wanted to develop a new feature.
=20
In my application I'm using a server-based sessions-management, which
stores my object instances in a sessions-directory, which itself is
stored in the ZODB. Now one of these objects has a dictionary, which
stores multiple subobjects, for example the main object is a company,
which has subobjects representing contact-persons in this company. Now
I've written functions, which allow the user to add/change and remove
contact-persons for a company. To let this work, the companies object
with all the subobject is stored in the ZODB. Now the problem is, that
zope seems to forget the contents of the dictionary. You can add, remove
and change the subobjects, but suddenly the dictionary contains only
that subobjects, which where in at the beginning.
=20
Example:
The companies instance is stored into a ZODB Folder with the id
"Company10". Now this instance has a property "contacts", which has a
directory named "__items__". The contacts itself are represented by
another object, which instances are stored in contacts.__items__. So if
you call Company10, there are 3 contacts saved into __items__.
Company10.contacts.__items__{1:Contact Instance at ..., 2:Contact
Instance at..., 3:Contact Instance at ...}
You can now add, remove and change the contacts for the company, but
suddenly all changes made for the __items__ dictionary are lost. Maybe
you've deleted all of the initial instances, and added two new contacts,
your changes disappear and the dictionary contains only the initial
three contacts.
=20
I couldn't find out, why or when this is happening. BUT: if I start the
zope server in debug mode, everything is working fine !
=20
I started the development with zope 2.4.0, but even the update to 2.4.3
doesn't solved the problem. I've read all the changes made since 2.4.0
to 2.5.0, but I couldn't find an entry matching my problem.
=20
I then thought to pickle the objects myself and save them to the linux
filesystem. But it's not possible to pickle my objects, cause there are
references to the zope ZODB and the REQUEST object, which is obviously
not pickable.
=20
Do you know how to solve this problem ? I don't know, what to do else.
In general, the whole application is based on the mechanism, storing
objects and subobjects into the ZODB, cause HTTP is a connection-less
protocol.
=20
Thanks for your help in forward.
Yours=20
Marcus Ollas.=20
___________________________________________=20
     __=20
|   |  | \  /   LOXCOM=20
|   |  |  \/    digital services GmbH=20
|   |  |  /\    Weseler Str. 67-69=20
|__ |__| /  \   D-45721 Haltern=20
Marcus Ollas=20
Systems Engineering=20
Telefon: +49 (0) 2364 / 9238-94=20
Telefax: +49 (0) 2364 / 9238-90=20
Mobil:   +49 (0) 173 / 539 6150=20
Email:   mco@loxcom.net=20
___________________________________________=20
=20

------_=_NextPart_001_01C1D8F3.0BC323F0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C1D903.CF0CB3D0">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"country-region"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"place"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p
	{mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
span.EmailFormatvorlage17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Normale Tabelle";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DDE link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:35.4pt'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Dear <span =
class=3DGramE>sirs</span>,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><span class=3DSpellE><span class=3DGramE><font =
size=3D2
face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>i&#8217;m</span></font></span></span><font =
size=3D2
face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> a software developer from =
</span></font><st1:country-region><st1:place><span
  class=3DSpellE><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
  =
font-family:Arial;mso-ansi-language:EN-GB'>germany</span></font></span></=
st1:place></st1:country-region><font
size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> and actually writing a web-based application. =
This
application is based on <span class=3DSpellE>zope</span>, because in my =
opinion <span
class=3DSpellE>zope</span> is perfect for this. I&#8217;ve developed =
this
application as a python based product, the first version written in =
<span
class=3DSpellE>dtml</span> was too slow. Everything has worked fine, =
till I wanted
to develop a new feature.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>In my application =
I&#8217;m
using a server-based sessions-management, which stores my object =
instances in a
sessions-directory, which itself is stored in the ZODB. Now one of these =
objects
has a dictionary, which stores multiple <span =
class=3DSpellE>subobjects</span>,
for example the main object is a company, which has <span =
class=3DSpellE>subobjects</span>
representing contact-persons in this company. Now I&#8217;ve written =
functions,
which allow the user to add/change and remove contact-persons for a =
company. To
let this work, the companies object with <span class=3DGramE>all =
the</span> <span
class=3DSpellE>subobject</span> is stored in the ZODB. Now the problem =
is<span
class=3DGramE>,</span> that <span class=3DSpellE>zope</span> seems to =
forget the contents
of the dictionary. You can add, remove and change the <span =
class=3DSpellE>subobjects</span>,
but suddenly the dictionary contains only that <span =
class=3DSpellE>subobjects</span>,
which where in at the beginning.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Example:<o:p></o:p></sp=
an></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>The companies instance =
is
stored into a ZODB Folder with the id &#8220;Company10&#8221;. Now this
instance has a property &#8220;contacts&#8221;, which has a directory =
named &#8220;__items__&#8221;.
The contacts itself are represented by another object, which instances =
are
stored in <span class=3DSpellE>contacts.__items</span>__. So if you call =
Company10,
there are 3 contacts saved into __items__.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Company10.contacts.__it=
ems_<span
class=3DGramE>_{</span>1:Contact Instance at &#8230;, 2:Contact Instance =
at&#8230;,
3:Contact Instance at &#8230;}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>You can now add<span
class=3DGramE>,</span> remove and change the contacts for the company, =
but
suddenly all changes made for the __items__ dictionary are lost. Maybe =
you&#8217;ve
deleted all of the initial instances, and added two new contacts, your =
changes disappear
and the dictionary contains only the initial three =
contacts.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I couldn&#8217;t find =
out, why
or when this is happening. BUT: if I start the <span =
class=3DSpellE>zope</span>
server in debug mode, everything is working <span class=3DGramE>fine =
!</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I started the =
development
with <span class=3DSpellE>zope</span> 2.4.0, but even the update to =
2.4.3 doesn&#8217;t
<span class=3DGramE>solved</span> the problem. I&#8217;ve read all the =
changes
made since 2.4.0 to 2.5.0, but I couldn&#8217;t find an entry matching =
my
problem.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I then thought to =
pickle the
objects myself and save them to the <span class=3DSpellE>linux</span> =
<span
class=3DSpellE>filesystem</span>. But it&#8217;s not possible to pickle =
my
objects, <span class=3DGramE>cause</span> there are references to the =
<span
class=3DSpellE>zope</span> ZODB and the REQUEST object, which is =
obviously not <span
class=3DSpellE>pickable</span>.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Do you know how to =
solve this
<span class=3DGramE>problem ?</span> I don&#8217;t know, what to do =
else. In
general, the whole application is based on the mechanism, storing =
objects and <span
class=3DSpellE>subobjects</span> into the ZODB, <span =
class=3DGramE>cause</span>
HTTP is a connection-less protocol.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span=
></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DEN-GB =
style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Thanks for your help =
in
forward.<o:p></o:p></span></font></p>

<p><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Yours</span></font><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB;mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Marcus =
Ollas.</span></font><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB;mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-no-proof:yes'>___________________________________________</span>=
</font><span
style=3D'mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>&nbsp;&nbsp;&nbsp;&nbsp; =
__</span></font><span
style=3D'mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>|&nbsp;&nbsp; |&nbsp; | =
\&nbsp;
/&nbsp;&nbsp; LOXCOM</span></font><span style=3D'mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>|&nbsp;&nbsp; |&nbsp; =
|&nbsp;
\/&nbsp;&nbsp;&nbsp; digital services GmbH</span></font><span =
style=3D'mso-no-proof:
yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>|&nbsp;&nbsp; |&nbsp; =
|&nbsp;
/\&nbsp;&nbsp;&nbsp; Weseler Str. 67-69</span></font><span =
style=3D'mso-no-proof:
yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New";mso-no-proof:yes'>|__ |__| /&nbsp; =
\&nbsp;&nbsp;
D-45721 Haltern</span></font><span style=3D'mso-no-proof:yes'> =
<o:p></o:p></span></p>

<p><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Marcus
Ollas</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:EN-GB;mso-no-proof:
yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Systems
Engineering</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:EN-GB;
mso-no-proof:yes'> <o:p></o:p></span></p>

<p><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Telefon:
+49 (0) 2364 / 9238-94</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:
EN-GB;mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Telefax:
+49 (0) 2364 / 9238-90</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:
EN-GB;mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Mobil:&nbsp;&nbsp;
+49 (0) 173 / 539 6150</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:
EN-GB;mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>Email:&nbsp;&nbsp;
mco@loxcom.net</span></font><span lang=3DEN-GB =
style=3D'mso-ansi-language:EN-GB;
mso-no-proof:yes'> <br>
</span><font size=3D2 face=3D"Courier New"><span lang=3DEN-GB =
style=3D'font-size:10.0pt;
font-family:"Courier =
New";mso-ansi-language:EN-GB;mso-no-proof:yes'>__________________________=
_________________</span></font><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB;mso-no-proof:yes'> =
</span><span
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></spa=
n></font></p>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C1D8F3.0BC323F0--