archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mandie Smith <man...@houseofgnomes.net>
Subject Re: trouble with Archiva and commons-vfs
Date Wed, 24 Mar 2010 18:38:02 GMT
Unfortunately, even with trying to copy the file directly I still get the
same exception on the 302 Found.  Why does the redirect exist here?

147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "HEAD / HTTP/1.1" 404 1268
"-" "Jakarta Commons-HttpClient/3.1"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg/testArtifact/1.0/testArtifact-1.0.pom
HTTP/1.1" 404 0 "-" "Jakarta-Commons-VFS"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg/testArtifact/1.0/testArtifact-1.0.pom
HTTP/1.1" 404 0 "-" "Jakarta-Commons-VFS"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg/testArtifact/1.0 HTTP/1.1" 404 0 "-"
"Jakarta-Commons-VFS"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg/testArtifact HTTP/1.1" 404 0 "-"
"Jakarta-Commons-VFS"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots/testOrg HTTP/1.1" 404 0 "-"
"Jakarta-Commons-VFS"
147.117.66.61 -  -  [24/Mar/2010:18:30:55 +0000] "PROPFIND
/archiva/repository/snapshots HTTP/1.1" 302 0 "-" "Jakarta-Commons-VFS"


The stacktrace that includes the DavException is as follows:

 [vfs:copy] org.apache.jackrabbit.webdav.DavException: Found
 [vfs:copy]     at
org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseException(DavMethodBase.java:172)
 [vfs:copy]     at
org.apache.jackrabbit.webdav.client.methods.DavMethodBase.checkSuccess(DavMethodBase.java:181)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.execute(WebdavFileObject.java:400)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:489)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:464)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:457)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:449)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:429)
 [vfs:copy]     at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doGetType(WebdavFileObject.java:113)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:467)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:931)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(AbstractFileObject.java:952)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1390)
 [vfs:copy]     at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:459)
 [vfs:copy]     at
org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:439)
 [vfs:copy]     at
org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:112)
 [vfs:copy]     at
org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:1023)
 [vfs:copy]     at
org.apache.commons.vfs.tasks.CopyTask.handleOutOfDateFile(CopyTask.java:81)
 [vfs:copy]     at
org.apache.commons.vfs.tasks.AbstractSyncTask.handleFile(AbstractSyncTask.java:411)
 [vfs:copy]     at
org.apache.commons.vfs.tasks.AbstractSyncTask.handleSingleFile(AbstractSyncTask.java:397)
 [vfs:copy]     at
org.apache.commons.vfs.tasks.AbstractSyncTask.execute(AbstractSyncTask.java:214)
 [vfs:copy]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
 [vfs:copy]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [vfs:copy]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [vfs:copy]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [vfs:copy]     at java.lang.reflect.Method.invoke(Method.java:597)
 [vfs:copy]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 [vfs:copy]     at org.apache.tools.ant.Task.perform(Task.java:348)
 [vfs:copy]     at org.apache.tools.ant.Target.execute(Target.java:357)
 [vfs:copy]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
 [vfs:copy]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
 [vfs:copy]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
 [vfs:copy]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 [vfs:copy]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
 [vfs:copy]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
 [vfs:copy]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
 [vfs:copy]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
 [vfs:copy]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


Mandie

On Tue, Mar 16, 2010 at 4:24 PM, Brett Porter <brett@apache.org> wrote:

> These look like VFS issues. It should be handling the 302 redirect
> correctly. As for whether it supports making multiple directories at once,
> I'm not sure. You could try doing:
> <vfs:mkdir dir="webdav://
> user:password@hostname.com/archiva/repository/snapshots/testOrg" />
> <vfs:mkdir dir="webdav://
> user:password@hostname.com/archiva/repository/snapshots/testOrg/testArtifact"
> />
>
> However, Archiva actually allows "cheating" on the WebDAV protocol to avoid
> all the mkdir calls. So if you try putting a file directly to, say,
> webdav://
> user:password@hostname.com/archiva/repository/snapshots/testOrg/testArtifact/1.0/testArtifact-1.0.pom,
> it should work without the mkdir calls.
>
> Cheers,
> Brett
>
> On 17/03/2010, at 6:32 AM, Mandie Smith wrote:
>
> > I'm trying to get commons-vfs talking to Archiva and I'm having trouble
> > getting them talking and I was hoping someone here could help me out.
> >
> > I'm just trying a simple test to 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.  When I
> > look at the Archiva access logs 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"
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message