Doug Chestnut wrote:
Hi Devs,
After updating my 1.4 install this week I have noticed "The document ... is already contained!" errors when trying to view a page in the authoring area of one of my pubs (If I comment out the usecasemenu transformer the error goes away). I get the same error when trying to publish as well.

I also got this error in first level publications, but very rarely.
I didn't yet find the cause, but I suspect that it is related to
a lack of thread safety or improper reuse of objects.


It is really strange as I didn't get the error before the upgrade, and it only seems to affect a 3rd level publication (pub has a parent pub template and a grandparent template) in tomcat (on my server). I don't get the error from jetty on my laptop.

My error seems to be related to the rather strict add method of the DocumentSet class.

Actually I don't think so. It might rather be related to concurrent
access, or to a situation where components are not properly released.


Does the add method really need to throw an error if a duplicate doc is added, can't it just dedupe silently?

I think it should throw an error to point out programming mistakes.
IMO robustness (in the sense of indulgence to errors) at this atomic
level causes more harm than good.

In this case, not throwing an error might actually mask the
underlying cause of the problem, and later on we could be faced
with memory leaks and other serious problems later on ...

Would you mind filing a bug describing your observations?
Thanks a lot!

(as in the patch below) Or should I look for all occurrences of DocumentSet.add() and wrap them in a if(!DocumentSet.contains())?

That shouldn't be necessary in most cases.

-- Andreas

--
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[EMAIL PROTECTED]                     [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to