cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Stochmialek <>
Subject WebDAVSource.getParent() and makeCollection()
Date Sun, 27 Jun 2004 22:01:23 GMT

Something's wrong with implementation of getParent and makeCollection methods.
(in cocoon 2.1.5)

makeCollection() - creates collection only if parent exists. Can't create
  directory hierarchy. When I try, i've got this exception:

org.apache.excalibur.source.SourceException: Unable to create collection
 Server responded 404 (Not Found (404))

Directory einformatyka/articles exists, review - don't.

Is this correct implementation of ModifiableTraversableSource?

Well, i tried to make a work around, and created method like this:

private void createDirectories(ModifiableTraversableSource source) throws SourceException
        System.out.println("Creating dir ["+source.getURI()+"] " + " EXISTS: "+source.exists());

    	if (source.exists()) return;
    	if (!source.getParent().exists())

And this doesn't work too. It goes into infintive loop of recursive
calls. On standard output I get:

 Creating dir [webdav://localhost/svn/einformatyka/articles/review/1088373196783] EXISTS:
 Creating dir [webdav://localhost/svn/einformatyka/articles/review/] EXISTS: false
 Creating dir [webdav://localhost/svn/einformatyka/articles/review/] EXISTS: false
 Creating dir [webdav://localhost/svn/einformatyka/articles/review/] EXISTS: false
 Creating dir [webdav://localhost/svn/einformatyka/articles/review/] EXISTS: false
 [ and so on...]

NOTE slash at the end of URI (review/)

This example demonstrates that sometimes: source ==

Is this a bug in cocoon or in webdav-lib? Or is this a feature? ;)

Michal Stochmialek <>

View raw message