You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Bob Harner <bo...@gmail.com> on 2005/12/13 21:10:53 UTC

Re: sitetree out of synch

Sorry, I forgot to follow up on this after Josias' reply a month ago. 
I was prompted to do so today by a message on the user list that may
be the same bug.

Anyway, for the record, 3 weeks ago I upgraded to JDK version 1.4.2_06
and still got the same problem when I use the out-of-the box version
of AbstractPublication.java.  I confirmed that again today.  Still a
problem.  This is only on my Solaris box running WebLogic 8.1, *not*
my PC running Jetty.  Both are Lenya 1.2.4.

On 11/9/05, Bob Harner <bo...@gmail.com> wrote:
> Hmm, I'm using jdk141_05.  I suppose I should try 1.4.2.  I'll give that a shot.
>
> On 11/9/05, Josias Thoeny <jo...@wyona.com> wrote:
> > On Tue, 2005-11-08 at 17:20 -0500, Bob Harner wrote:
> > > I never got any reply on this, from either the user or dev lists.
> > > Eventually I figure out that AbstractPublication.java's getTree()
> > > method is where the sitetree.xml contents are cached, in the siteTrees
> > > hash.  And I discovered that if I change AbstractPublication.java so
> > > that the "siteTrees.containsKey(area)" test (line 327 in my Lenya
> > > 1.2.4 version) is skipped then my problems go away (there should be a
> > > performance cost in doing so, but it appears to be pretty small).
> > >
> > > Strangely, I don't see anything in AbstractPublication.java that
> > > *ever* invalidates the cache, which would be needed whenever a
> > > document is created, moved, renamed, etc., so I don't see how it is
> > > *ever* working, even for non-WebLogic deployments.
> >
> >
> > Actually this "cache" doesn't have to be invalidated when the sitetree
> > changes, because the tree object is always updated with the changes.
> > When you create a new document, a new node is first inserted into the
> > in-memory representation of the sitetree, and then this sitetree is
> > saved to the xml file. When you call getTree() the next time, you should
> > get the updated tree object without re-reading it from the file.
> > Well, that's how it should work. Of course this doesn't explain your
> > problem...
> >
> > Sorry if that's not much help, I have no idea what's going wrong.
> >
> > Which version of Java are you using?
> >
> > - Josias
> >
> >
> > >
> > > Am I not getting any feedback on this because the site tree mechanisms
> > > are entirely different in 1.4?  If so, I still think that the 1.2.4
> > > documentation on the Lenya web site should have a lout disclaimer
> > > about it not working well under WebLogic 8.x.
> > >
> > > > -----Original Message-----
> > > >  From: harnerrd@netscape.net [mailto:harnerrd@netscape.net]
> > > >  Sent: Monday, October 31, 2005 4:15 PM
> > > >  To: user@lenya.apache.org
> > > >  Subject: Re: sitetree out of synch
> > > >
> > > >  Hello Developers,
> > > >
> > > >  I didn't get an answer to this on the user list, and I'm still stuck,
> > > >  so I thought I'd ask you really smart guys on the dev list...
> > > >
> > > >  The Lenya CMS is not seeing changes to my publication's site tree.
> > > >  That is, when I do anything that would affect the sitetree.xml file
> > > >  (e.g. moving a document up/down, changing the navigation title, or
> > > >  creating or deleting a new document, the
> > > >  lenya/pubs/{publication}/content/authoring/sitetree.xml file is being
> > > >  changed correctly on disk but the web interface is *not* updating. The
> > > >   site tree shown on the Site tab remains unchanged and out of date
> > > > until
> > > >  I restart Lenya.
> > > >
> > > >  I think I understand how Cocoon caching works, and ultimately the
> > > >  SiteTreeGenerator component defined in sitemap.xmap should be checking
> > > >  the modification date of the sitetree.xml file, right?
> > > >
> > > >  I know this is not a browser caching issue because the date in the
> > > >  upper right corner of the page always changes.
> > > >
> > > >  What could cause the site tree component in memory to not update?
> > > >
> > > >  Thanks for any help you can provide! I can't do much of anything with
> > > >  Lenya unless I can resolve this.
> > > >
> > > >  -----Original Message-----
> > > >  From: harnerrd@netscape.net [mailto:harnerrd@netscape.net]
> > > >  Sent: Monday, October 31, 2005 11:06 AM
> > > >  To: user@lenya.apache.org
> > > >  Subject: Re: sitetree out of synch
> > > >
> > > >  A correction on my situation. Restarting my Lenya *does* put the Lenya
> > > >  GUi back into synch with what is in sitetree.xml.
> > > >
> > > >  Restarting Lenya every time a new document is created isn't practical,
> > > >  of course. So my question becomes: what would cause the Lenya GUI
> > > >  (e.g., the Site tab) to not reflect what is in sitetree.xml?
> > > >
> > > >   Create, delete, move up/down, edit navigation title, all these have
> > > > the
> > > >  same problem where the Lenya GUI is out of synch with changes made
> > > >  correctly to sitetree.xml.
> > > >
> > > >  I'm running Lenya 1.2.4 under WebLogic 8.1 SP2 running behind an SSL
> > > >  SunOne web server.
> > > >
> > > >  -----Original Message-----
> > > >  From: harnerRD
> > > >  To: user@lenya.apache.org
> > > >  Sent: Mon, 31 Oct 2005 10:06:54 -0500
> > > >  Subject: sitetree out of synch
> > > >
> > > >  Hello all!
> > > >
> > > >  When creating a new document in Lenya 1.2.4 (under WebLogic 8.1), the
> > > >  page is created and the sitetree file (pubs/{my
> > > >  pub}/content/authoring/sitetree.xml) is updated correctly on disk, but
> > > >  apparently not in memory. Lenya's log file says:
> > > >
> > > >  4 2005-10-31 09:03:50,315 [ExecuteThread: '24' for queue:
> > > >  'weblogic.kernel.Default'] ERROR
> > > >  sitemap.handled-errors.prepareErrorHandler():165 - Document /test333
> > > >  does not exist. Check sitetree, it might need to be reloaded.
> > > >  org.apache.lenya.cms.publication.DocumentDoesNotExistException:
> > > >  Document
> > > >  /test333 does not exist. Check sitetree, it might need to be reloaded.
> > > >
> > > >  So, how do I reload the sitetree? I can't find it in the docs.
> > > >
> > > >  There are other signs that the sitetree is out of synch somehow. For
> > > >  example, when deleting a document, the GUI appears to work normally,
> > > >  and the document is removed from sitetree.xml, but the document still
> > > >   appears in the "Site" tab in the Lenya GUI. Even after restarting
> > > > Lenya
> > > >   the sitetree.xml on disk is out of synch with the GUI in this way. So
> > > > I
> > > >  assume Cocoon is caching something. How do I clear the cache, if that
> > > >  is likely to help?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org