On Fri, 2005-07-22 at 09:01 +0200, Jann Forrer wrote:
> On Thu, 21 Jul 2005, Josias Thoeny wrote:
> 
> > > Josias Thoeny wrote:
> > >> Hi,
> > >>
> > >> It seems to me that the DocumentManagerImpl in lenya-trunk copies the
> > >> resources twice if a document is moved (code below is simplified):
> > >>
> > >> public void move(Document sourceDocument, Document destinationDocument)
> > >> {
> > >>   copy(sourceDocument, destinationDocument);
> > >>   resourcesManager.copyResources(sourceDocument, destinationDocument);
> > >>   resourcesManager.deleteResources(sourceDocument);
> > >>   delete(sourceDocument);
> > >> }
> > >>
> > >> public void copy(Document sourceDocument, Document destinationDocument)
> > >> {
> > >>   [... copy document source ...]
> > >>   resourcesManager.copyResources(sourceDocument, destinationDocument);
> > >> }
> > >>
> > >> And it seems they are also deleted twice.
> > >> I didn't try it out, I was just reading the code.
> > >
> > > Apparently you're right.
> > >
> > >> Should I open a bugzilla entry?
> > >
> > > That would be great - maybe you could even add a patch?
> >
> > I will do that.
> > In fact I have changed the DocumentManagerImpl and wanted to try if it
> > works by using the changeNodeID usecase. But I cannot get this usecase to
> > work, even without my modifications. The error message is:
> >
> > "file:/hda3/home/josias/src/apache/lenya-trunk/build/lenya/webapp/lenya/usecases/usecases.js",
> > line 89: uncaught JavaScript exception: at executeUsecase
> > (file:/hda3/home/josias/src/apache/lenya-trunk/build/lenya/webapp/lenya/usecases/usecases.js,
> > Line 89): java.lang.StackOverflowError
> >
> 
> I had similiar problems yesterday i.e. get the same error message with the
> create usecase and had a rather  long debugging session in order found the
> problem (note that i use cocoon-2.1.8-dev and tomcat).

Thanks for your answer.
I was using Jetty with Cocoon 2.1.7 on Debian Linux when I got this
problem. Maybe my Jetty uses a different library than yours?

Josias


> 
> The problem starts here:
> 
>    StreamResult result = new StreamResult(file);
> 
> in the DocumentHelper class i.e. i got a systemid = "file:/....." instead
> of "file:/// ........" which can be traced back to
> javax/xml/transform/stream/StreamResult.java. The funny thing was that the
> problem did not occur if i used jetty (on a SuSE linux system).
> So what was the actual reason for this:
> 
> - I use cocoon-2.1.8-dev and its xml-apis.jar is different to the one in
>   cocoon-2.1.7 and also differen to $LENYA_HOME/lib/xml-apis.jar (the
>   build process did copy the one from cocoon to
>   build/lenya/webapps/WEB-INF/lib).
>   Comparing the StreamResult.class of both jar's show that they really
>   differ. I could not have lookd into the code because i did not have the
>   source of the xml-apis.jar used by  cocoon-2.1.8-dev.
>   If I did use the $LENYA_HOME/lib/xml-apis.jar then i did not get
>   this message and all works fine.
> 
> - BTW jetty is only working because it uses the native api from the jvm at
>   least on my linux box.
> 
> I will start a new thread concering the libraries  in order to discuss my
> findings.
> 
> Jann
> 
> 
> ---------------------------------------------------------------
> 
> 
> Jann Forrer
> Informatikdienste
> Universität Zürich
> Winterthurerstr. 190
> CH-8057 Zuerich
> 
> oooO   mail:  [EMAIL PROTECTED]
> (  )   phone: +41 44 63 56772
>  \ (   fax:   +41 44 63 54505
>   \_)  http://www.id.unizh.ch
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to