cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Stochmialek <mi...@e-informatyka.pl>
Subject Re: WebDAVSource.getParent() and makeCollection()
Date Tue, 29 Jun 2004 20:46:40 GMT
On Tue, Jun 29, 2004 at 06:14:12PM +0200, Unico Hommes wrote:

> >It tried again makeCollection method, and i've got exception below:
> >
> >Caused by: org.apache.excalibur.source.SourceException:
> >Unable to create collection 
> >webdav://localhost/svn/einformatyka/articles/review/1088515900892.  Server 
> >responded 404 (Not Found (404))
> >    at 
> >    org.apache.cocoon.components.source.impl.WebDAVSource.makeCollection(WebDAVSource.java:763)
> >    at 
> >    pl.einformatyka.common.components.filesystem.FileManagerImpl.createDirectory(FileManagerImpl.java:79)
> >

Identical exception appeared again (like above). :/

But when i changed makeCollection to this below, it started to works :)

int status = this.resource.getStatusCode();
if (status == 404) {
    // parent does not exist, create it and try again
    ((ModifiableTraversableSource) getParent()).makeCollection();
    makeCollection();
}

Main (and only) change is in second line (757. line in file),
i changed 409 status code, to 404 (not found) status code.

(btw. i'm using subversion webdav interface on apache httpd,
 i'm not sure if status codes are the same when you use slide
 or something...)

> Actually I don't. It already exists. See src/blocks/webdav/test . I 
> added your scenario and fixed the problem. Try again now.

You solved problem with dependecy to existence
of parent element.  getParent now works!  Thanks fast response :)

regards,
-- 
Michal Stochmialek <misto@e-informatyka.pl>

Mime
View raw message