[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-user
Subject:    Re: [vfs-trunk] webdav and ant tasks
From:       Mandie Smith <mandie () houseofgnomes ! net>
Date:       2010-03-24 16:07:26
Message-ID: f569752c1003240907mad58143ke2d1611ebc0b2d12 () mail ! gmail ! com
[Download RAW message or body]


I checked with the archiva list and the only response I got was that vfs
should handle the 302 redirect correctly.

I modified the vfs code to print the source stacktrace:

[vfs:mkdir] Using "/tmp/vfs_cache" as temporary files store.
[vfs:mkdir] Creating directory "webdav://ads:ads123@hostname
/archiva/repository/snapshots/testOrg/testArtifact".
[vfs:mkdir] status: 302
[vfs:mkdir] org.apache.jackrabbit.webdav.DavException: Found
[vfs:mkdir]     at
org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseException(DavMethodBase.java:172)
[vfs:mkdir]     at
org.apache.jackrabbit.webdav.client.methods.DavMethodBase.checkSuccess(DavMethodBase.java:181)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.execute(WebdavFileObject.java:400)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:489)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:464)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:457)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:449)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:429)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doGetType(WebdavFileObject.java:113)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:467)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:931)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
[vfs:mkdir]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
[vfs:mkdir]     at
org.apache.commons.vfs.tasks.MkdirTask.execute(MkdirTask.java:62)
[vfs:mkdir]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[vfs:mkdir]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[vfs:mkdir]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[vfs:mkdir]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[vfs:mkdir]     at java.lang.reflect.Method.invoke(Method.java:597)
[vfs:mkdir]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[vfs:mkdir]     at org.apache.tools.ant.Task.perform(Task.java:348)
[vfs:mkdir]     at org.apache.tools.ant.Target.execute(Target.java:357)
[vfs:mkdir]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
[vfs:mkdir]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[vfs:mkdir]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[vfs:mkdir]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[vfs:mkdir]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[vfs:mkdir]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
[vfs:mkdir]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
[vfs:mkdir]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[vfs:mkdir]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[vfs:mkdir] Found 302


On Tue, Mar 16, 2010 at 7:49 PM, Ralph Goers <ralph.goers@dslextreme.com>wrote:

> Have you asked this question on the archiva list? The only thing I know
> about archiva is that it is a Maven repository manager. I have no idea
> whether it claims to be webdav compliant but when I looked at the spec I
> didn't see anything saying it was acceptable to return a 302 to say it found
> a directory. It should be returning a 207.
>
> This may be related to http://jira.codehaus.org/browse/MRM-419.
>
> On the other hand, I found http://www.webdav.org/specs/rfc4437.html which
> apparently describes this behavior. Since it is experimental I'd be
> surprised if Archiva is implementing it.
>
> Unfortunately, ExceptionConverter is hiding the DavException thrown by
> Jackrabbit so I'm having difficulty determining what part of Jackrabbit's
> webdav code is throwing the exception. Since I don't have an Archiva set up
> it will be difficult for me to test this.
>
> Ralph
>
>
> On Mar 16, 2010, at 7:38 AM, Mandie Smith wrote:
>
> > I was wondering if anyone has any further ideas on this, because I'm
> stuck.
> >
> > thanks,
> > Mandie
> >
> > On Fri, Mar 12, 2010 at 11:31 AM, Mandie Smith <mandie@houseofgnomes.net
> >wrote:
> >
> >> The WebDav server is Archiva.  When I look at the request logs on the
> >> server I see the following:
> >>
> >> 1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "HEAD / HTTP/1.1" 404 1268
> "-"
> >> "Jakarta Commons-HttpClient/3.1"
> >> 1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
> >> /archiva/repository/snapshots/testOrg/testArtifact HTTP/1.1" 404 0 "-"
> >> "Jakarta-Commons-VFS"
> >> 1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
> >> /archiva/repository/snapshots/testOrg HTTP/1.1" 404 0 "-"
> >> "Jakarta-Commons-VFS"
> >> 1.1.1.1 -  -  [12/Mar/2010:15:19:46 +0000] "PROPFIND
> >> /archiva/repository/snapshots HTTP/1.1" 302 0 "-" "Jakarta-Commons-VFS"
> >>
> >> What this looks like to me is Vfs going up the directory tree to see how
> >> many directories it needs to create, so Archiva is responding with 404
> Not
> >> Found for each not found directory and then 302 Found for the directory
> that
> >> exists.
> >>
> >> Mandie
> >>
> >>
> >> On Wed, Mar 10, 2010 at 9:03 PM, Ralph Goers <
> ralph.goers@dslextreme.com>wrote:
> >>
> >>> I've never used the ant tasks myself, but it isn't clear to me that
> this
> >>> has anything to do with them.
> >>>
> >>> Wikipedia at http://en.wikipedia.org/wiki/HTTP_302 says a 302 is a
> >>> redirect. Jackrabbit uses HttpClient which may not follow the redirect.
> What
> >>> are you using for a WebDav server? Do you have access to its logs? They
> >>> might provide some useful information.
> >>>
> >>> Ralph
> >>>
> >>> On Mar 10, 2010, at 8:26 AM, Mandie Smith wrote:
> >>>
> >>>> I'm trying to test out the webdav functionality in the trunk of vfs
> and
> >>> I'm
> >>>> having some trouble with the ant tasks.  I'm just trying a simple test
> >>> to
> >>>> try and create a directory on the webdav server.  My build.xml looks
> >>> like
> >>>> this:
> >>>>
> >>>> <project name="test" xmlns:vfs="antlib:org.apache.commons.vfs.tasks">
> >>>> <target name="main">
> >>>>   <vfs:mkdir dir="webdav://
> >>>>
> >>>
> user:password@hostname.com/archiva/repository/snapshots/testOrg/testArtifact
> >>> "
> >>>> />
> >>>> </target>
> >>>> </project>
> >>>>
> >>>> When I try to run this I get the following exception:
> >>>>
> >>>> org.apache.commons.vfs.FileSystemException: Could not determine the
> type
> >>> of
> >>>> file "webdav://user:***@
> >>> hostname.com/archiva/repository/snapshots/testOrg".
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:476)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:931)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
> >>>>   at org.apache.commons.vfs.tasks.MkdirTask.execute(MkdirTask.java:62)
> >>>>   at
> >>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> >>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>>   at
> >>>>
> >>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>>>   at
> >>>>
> >>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>   at java.lang.reflect.Method.invoke(Method.java:597)
> >>>>   at
> >>>>
> >>>
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >>>>   at org.apache.tools.ant.Task.perform(Task.java:348)
> >>>>   at org.apache.tools.ant.Target.execute(Target.java:357)
> >>>>   at org.apache.tools.ant.Target.performTasks(Target.java:385)
> >>>>   at
> >>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
> >>>>   at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> >>>>   at
> >>>>
> >>>
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> >>>>   at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> >>>>   at org.apache.tools.ant.Main.runBuild(Main.java:758)
> >>>>   at org.apache.tools.ant.Main.startAnt(Main.java:217)
> >>>>   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> >>>>   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> >>>> Caused by: org.apache.commons.vfs.FileSystemException: Unknown message
> >>> with
> >>>> code "Found".
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.ExceptionConverter.generate(ExceptionConverter.java:88)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.ExceptionConverter.generate(ExceptionConverter.java:41)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.execute(WebdavFileObject.java:413)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:488)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:463)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:456)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:448)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:428)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doGetType(WebdavFileObject.java:113)
> >>>>   at
> >>>>
> >>>
> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:467)
> >>>>   ... 20 more
> >>>>
> >>>> Total time: 1 second
> >>>>
> >>>>
> >>>> I dug through the source and the exact HTTP code was a 302 Found,
> which
> >>>> makes no sense to me.
> >>>>
> >>>> Am I even using this correctly?  Could someone point me in the right
> >>>> direction?
> >>>>
> >>>> thanks,
> >>>> Mandie
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> >>> For additional commands, e-mail: user-help@commons.apache.org
> >>>
> >>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic