You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Yannick PIERSON <pi...@gmail.com> on 2008/06/05 16:58:24 UTC

VFS problem with StaticUserAuthenticator

Hi,

I'm using commons VFS and  I get a problem.

To access to virtual file system, I'm using this authentification :
this.auth = new StaticUserAuthenticator(credentials.getDomain(),
credentials.getUsername(), credentials.getPassword());

This code works whith smb protocol (share windows), but doesn't work with
webdav :
For it I must write the url -> webdav://user:password@host:port/directory.
And this code works...

But I want to use the same authentification that I'm using for smb.

Do you know why it doesn't work ?

I think my problem is on the realm definition.

My error trace :
ATTENTION: No credentials available for the 'WORKGROUP' authentication realm
at host
Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
not determine the type of file "webdav://host/directory/testFile.txt".
        at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
        at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
        at
org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
        at test.UserApp.main(UserApp.java:38)
Caused by: org.apache.commons.vfs.FileSystemException
        at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
        at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
        at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
        ... 3 more
Caused by: org.apache.commons.httpclient.HttpException
        at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
        at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
        at
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
        at
org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
        at
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
        at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
        ... 5 more

Regards,

Thanks,

Re: VFS problem with StaticUserAuthenticator

Posted by jharrop <ja...@plutext.org>.
This thread probably now belongs on the webdavclient4j forum - so I've copied
it there, and answered there.


jwcarman wrote:
> 
> Also, are there any thoughts on mavenizing the build?  I'd like to
> play around with the source code for webdavclient4j, but I don't even
> have Ant installed anymore.  I'd be willing to help out if need be.
> 
> On Tue, Jun 10, 2008 at 11:05 AM, jwcarman <ja...@carmanconsulting.com>
> wrote:
>>
>> Are there thoughts on doing a new release.  We really need webdav working
>> in
>> VFS and the core VFS code in the sandbox just doesn't work.  One simple
>> test
>> (connecting to a webdav directory and listing its contents) doesn't work
>> out
>> of the box.  I can't get the webdavclient4j webdav vfs provider to work
>> either.  I get an IllegalStateException ("this should not happen").
>>
>>
>> jharrop wrote:
>>>
>>>
>>> Stephan Schuster-3 wrote:
>>>>
>>>>  so i checked out the code of
>>>> webdavclient4j and fixed it along with the implementation of an
>>>> additional provider: webdavs (webdav over https). afterwards i posted
>>>> the patch to the website's forum [3] and sent it per mail to jason
>>>> harrop. so far he obviously hadn't had the time to apply the patch and
>>>> release a new version of webdavclient4j. that's why you have to
>>>> checkout
>>>> webdavclient4j, patch it with the stuff i wrote, build it yourself and
>>>> then use it with commons-vfs.
>>>
>>> Hi Stephan
>>>
>>> I did apply the patch in svn [1], but haven't released a new version
>>> yet.
>>>
>>> So he'll need to check out the sources and build it, but at least won't
>>> need to patch.
>>>
>>> cheers
>>>
>>> Jason
>>>
>>> [1]
>>> http://webdavclient4j.svn.sourceforge.net/viewvc/webdavclient4j?view=rev&revision=15
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17757712.html
>> Sent from the Commons - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17765167.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by James Carman <ja...@carmanconsulting.com>.
Also, are there any thoughts on mavenizing the build?  I'd like to
play around with the source code for webdavclient4j, but I don't even
have Ant installed anymore.  I'd be willing to help out if need be.

On Tue, Jun 10, 2008 at 11:05 AM, jwcarman <ja...@carmanconsulting.com> wrote:
>
> Are there thoughts on doing a new release.  We really need webdav working in
> VFS and the core VFS code in the sandbox just doesn't work.  One simple test
> (connecting to a webdav directory and listing its contents) doesn't work out
> of the box.  I can't get the webdavclient4j webdav vfs provider to work
> either.  I get an IllegalStateException ("this should not happen").
>
>
> jharrop wrote:
>>
>>
>> Stephan Schuster-3 wrote:
>>>
>>>  so i checked out the code of
>>> webdavclient4j and fixed it along with the implementation of an
>>> additional provider: webdavs (webdav over https). afterwards i posted
>>> the patch to the website's forum [3] and sent it per mail to jason
>>> harrop. so far he obviously hadn't had the time to apply the patch and
>>> release a new version of webdavclient4j. that's why you have to checkout
>>> webdavclient4j, patch it with the stuff i wrote, build it yourself and
>>> then use it with commons-vfs.
>>
>> Hi Stephan
>>
>> I did apply the patch in svn [1], but haven't released a new version yet.
>>
>> So he'll need to check out the sources and build it, but at least won't
>> need to patch.
>>
>> cheers
>>
>> Jason
>>
>> [1]
>> http://webdavclient4j.svn.sourceforge.net/viewvc/webdavclient4j?view=rev&revision=15
>>
>
> --
> View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17757712.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Re: VFS problem with StaticUserAuthenticator

Posted by Mario Ivankovits <ma...@ops.co.at>.
James Carman schrieb:
> Done.  I added myself as a developer.  If you want me to change it to
> "contributor", then I can do that also.
>   
No, "developer" was exactly what I had in mind :-)

Thanks! - and - Welcome!

Ciao,
Mario

> On Wed, Jun 11, 2008 at 9:07 AM, Mario Ivankovits <ma...@ops.co.at> wrote:
>   
>> Hi James!
>>     
>>> I might be able to spend
>>> a few cycles getting it set up.
>>>
>>>       
>> And probably you should add yourself to VFS's project-team :-)
>>
>> Ciao,
>> Mario
>>
>> [1] http://commons.apache.org/vfs/team-list.html
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>   

Re: VFS problem with StaticUserAuthenticator

Posted by James Carman <ja...@carmanconsulting.com>.
Just change the root level pom.xml file of the vfs project.  At least
that's all I did.  The update won't show up until someone builds a new
site and publishes it, though.

On Thu, Jun 12, 2008 at 6:06 AM, Stephan Schuster <st...@wilken.de> wrote:
> hi mario, hi james,
>
> i just wanted to do the same, but it seems that i'm too stupid. how do you
> "add yourself as a developer". i found no related links, neither on the page
> you mentioned nor on the vfs homepage. sorry!
>
>
> cheers,
> stephan
>
>
>
> James Carman wrote:
>>
>> Done.  I added myself as a developer.  If you want me to change it to
>> "contributor", then I can do that also.
>>
>> On Wed, Jun 11, 2008 at 9:07 AM, Mario Ivankovits <ma...@ops.co.at> wrote:
>>>
>>> Hi James!
>>>>
>>>> I might be able to spend
>>>> a few cycles getting it set up.
>>>>
>>> And probably you should add yourself to VFS's project-team :-)
>>>
>>> Ciao,
>>> Mario
>>>
>>> [1] http://commons.apache.org/vfs/team-list.html
>
> ---------------------------------------------------------------------
> 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


Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi mario!

> You aren't an Apache Commiter yet, no?

no i'm not, event though i've been active in other open source projects.

> You have to become an Apache Commons Committer first which requires to 
> send patches and being active on the ML for a while.

makes sense! ;-) i was already wondering...

> And there are a lot of bugs to fix for VFS waiting in JIRA, so if you 
> would like to join, feel free to pick them up and attach patches where 
> missing :-)

i'll see what i can do.


regards,
stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Stephan!
> i just wanted to do the same, but it seems that i'm too stupid. how do 
> you "add yourself as a developer". i found no related links, neither 
> on the page you mentioned nor on the vfs homepage. sorry!
You aren't an Apache Commiter yet, no?

You have to become an Apache Commons Committer first which requires to 
send patches and being active on the ML for a while.
And there are a lot of bugs to fix for VFS waiting in JIRA, so if you 
would like to join, feel free to pick them up and attach patches where 
missing :-)

Ciao,
Mario
>
>
> cheers,
> stephan
>
>
>
> James Carman wrote:
>> Done.  I added myself as a developer.  If you want me to change it to
>> "contributor", then I can do that also.
>>
>> On Wed, Jun 11, 2008 at 9:07 AM, Mario Ivankovits <ma...@ops.co.at> 
>> wrote:
>>> Hi James!
>>>> I might be able to spend
>>>> a few cycles getting it set up.
>>>>
>>> And probably you should add yourself to VFS's project-team :-)
>>>
>>> Ciao,
>>> Mario
>>>
>>> [1] http://commons.apache.org/vfs/team-list.html
>
> ---------------------------------------------------------------------
> 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


Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi mario, hi james,

i just wanted to do the same, but it seems that i'm too stupid. how do 
you "add yourself as a developer". i found no related links, neither on 
the page you mentioned nor on the vfs homepage. sorry!


cheers,
stephan



James Carman wrote:
> Done.  I added myself as a developer.  If you want me to change it to
> "contributor", then I can do that also.
> 
> On Wed, Jun 11, 2008 at 9:07 AM, Mario Ivankovits <ma...@ops.co.at> wrote:
>> Hi James!
>>> I might be able to spend
>>> a few cycles getting it set up.
>>>
>> And probably you should add yourself to VFS's project-team :-)
>>
>> Ciao,
>> Mario
>>
>> [1] http://commons.apache.org/vfs/team-list.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by James Carman <ja...@carmanconsulting.com>.
Done.  I added myself as a developer.  If you want me to change it to
"contributor", then I can do that also.

On Wed, Jun 11, 2008 at 9:07 AM, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi James!
>> I might be able to spend
>> a few cycles getting it set up.
>>
> And probably you should add yourself to VFS's project-team :-)
>
> Ciao,
> Mario
>
> [1] http://commons.apache.org/vfs/team-list.html
>
>
> ---------------------------------------------------------------------
> 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


Re: VFS problem with StaticUserAuthenticator

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi James!
> I might be able to spend
> a few cycles getting it set up.
>   
And probably you should add yourself to VFS's project-team :-)

Ciao,
Mario

[1] http://commons.apache.org/vfs/team-list.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by jharrop <ja...@plutext.org>.
Yes James, if you'd like to mavenize the webdavclient4j build for us, then
please be our guest :).  It'd definitely be appreciated. Otherwise, I can
probably find time to do it myself in a week or so.

We do have a bit of a chicken and the egg problem, in that webdavclient4j
uses HC 3.x, but to do that, it needs VFS to use the same HC (which only
requires that VFS-74 be applied).  It'd be great if that could make it into
the next VFS point release.  

So I'd settle for VFS 74 being applied in HEAD; and mavenizing the
webdavclient4j build myself.

VFS-74: https://issues.apache.org/jira/browse/VFS-74

cheers

Jason


Stephan Schuster-3 wrote:
> 
>> Right!  The first step is to get you guys on maven since that's the
>> easiest way to set up a maven-friendly release.  The process to get
>> you in the central repository isn't very difficult either.  The
>> requests do take some time, though.  My recent request took 2 weeks or
>> maybe longer I can't remember.  Then, we change VFS' webdav provider
>> to depend on webdavclient4j.  That sounds like a plan.  Again, if you
>> guys want help mavenizing, just let me know.  I might be able to spend
>> a few cycles getting it set up.
> 
> sounds good!
> 
> regarding the maven-friendly release i'm not an expert, but i always 
> wanted to learn more about it. i guess that would be the chance. 
> however, i definitly won't be able to spend some time here until i 
> finished my current project. so james, if you could "spend a few cycles 
> getting it set up" that would be great! probably you should contact 
> jason beforehand. unfortunately i wasn't able to reach him during the 
> last few days.
> 

-- 
View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17820320.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi together!

> Right!  The first step is to get you guys on maven since that's the
> easiest way to set up a maven-friendly release.  The process to get
> you in the central repository isn't very difficult either.  The
> requests do take some time, though.  My recent request took 2 weeks or
> maybe longer I can't remember.  Then, we change VFS' webdav provider
> to depend on webdavclient4j.  That sounds like a plan.  Again, if you
> guys want help mavenizing, just let me know.  I might be able to spend
> a few cycles getting it set up.

sounds good!

regarding the maven-friendly release i'm not an expert, but i always 
wanted to learn more about it. i guess that would be the chance. 
however, i definitly won't be able to spend some time here until i 
finished my current project. so james, if you could "spend a few cycles 
getting it set up" that would be great! probably you should contact 
jason beforehand. unfortunately i wasn't able to reach him during the 
last few days.


regards,
stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by James Carman <ja...@carmanconsulting.com>.
On Wed, Jun 11, 2008 at 7:39 AM, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi!
>> so what i meant (and i hope this is in line with jason harrop, the
>> project leader) is, that webdavclient4j should be the default library
>> (as it is slide at the moment) used for vfs' webdav providers.
>> therefore it would be necessary to take over webdavclient4j's vfs
>> providers (webdav and webdavs) to commons-vfs, exactly as you
>> mentioned it.
> Yep, if Jason is providing a release of the webdavlib4j core through an
> public maven repository we can go that route.

Right!  The first step is to get you guys on maven since that's the
easiest way to set up a maven-friendly release.  The process to get
you in the central repository isn't very difficult either.  The
requests do take some time, though.  My recent request took 2 weeks or
maybe longer I can't remember.  Then, we change VFS' webdav provider
to depend on webdavclient4j.  That sounds like a plan.  Again, if you
guys want help mavenizing, just let me know.  I might be able to spend
a few cycles getting it set up.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> so what i meant (and i hope this is in line with jason harrop, the
> project leader) is, that webdavclient4j should be the default library
> (as it is slide at the moment) used for vfs' webdav providers.
> therefore it would be necessary to take over webdavclient4j's vfs
> providers (webdav and webdavs) to commons-vfs, exactly as you
> mentioned it.
Yep, if Jason is providing a release of the webdavlib4j core through an
public maven repository we can go that route.

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi mario!

Mario Ivankovits wrote:
>> it would be great if you as a commons-vfs-comitter could replace slide
>> with webdavclient4j and make it part of the core instead of being in i
>> separate sandbox.

> What we can do is to take the webdavclient4j vfs provider over to
> apache. But I don't want to take the webdavclient4j core over as VFS is
> enough work to do already and I don't see enough developers around here
> maintaining that codebase then.
> There are already too few for vfs alone :-(

no no no, that's not what i meant! i think i wasn't clear enough. of 
course i didn't want you to take webdavclient4j core over to VFS. no! 
webdavclient4j should be an independent project but integrate nicely 
with vfs. so what i meant (and i hope this is in line with jason harrop, 
the project leader) is, that webdavclient4j should be the default 
library (as it is slide at the moment) used for vfs' webdav providers. 
therefore it would be necessary to take over webdavclient4j's vfs 
providers (webdav and webdavs) to commons-vfs, exactly as you mentioned 
it. the main benefits would be:

- vfs' webdav capability would dependent on an active project 
(webdavclient) instead of a dead one (slide).

- vfs would no longer force a dependency to an outdated version of 
httpclient since webdavclient4j works with hc 3.1, slide still needs 2.0.2.

- vfs' webdav capability could be part of vfs core and no longer have to 
be in a vfs sandbox (by the way: this is what i meant in my last posting 
;-))


to make it clear again: this is just my opinion. jason harrop is the man 
who has to make this decision. but i think both projects would benefit 
from this.


regards,
stephan




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
>> Are there thoughts on doing a new release.  We really need webdav
>> working in
>> VFS and the core VFS code in the sandbox just doesn't work.  One
>> simple test
>
> it would be great if you as a commons-vfs-comitter could replace slide
> with webdavclient4j and make it part of the core instead of being in i
> separate sandbox.
What we can do is to take the webdavclient4j vfs provider over to
apache. But I don't want to take the webdavclient4j core over as VFS is
enough work to do already and I don't see enough developers around here
maintaining that codebase then.
There are already too few for vfs alone :-(

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi james!

jwcarman wrote:
> Are there thoughts on doing a new release.  We really need webdav working in
> VFS and the core VFS code in the sandbox just doesn't work.  One simple test

it would be great if you as a commons-vfs-comitter could replace slide 
with webdavclient4j and make it part of the core instead of being in i 
separate sandbox.

> (connecting to a webdav directory and listing its contents) doesn't work out
> of the box.  I can't get the webdavclient4j webdav vfs provider to work
> either.  I get an IllegalStateException ("this should not happen").

hmmm, it's working fine for me. id you test with the correct 
dependencies? did you apply vfs-74? here is my environment:

// httpclient (should work with 3.1 as well)
- commons-httpclient-3.0.1.jar

// commons-vfs (patched with vfs-74 see [1])
- commons-vfs-1.1-patched-hc301-SNAPSHOT.jar

// the core webdav functionality (replaces slide)
- webdavclient4j-core-0.91.jar

// webdav providers for vfs -> the bridge between webdavclient4j and vfs 
(replaces vfs-sandbox stuff)
- webdavclient4j-vfs-0.91.jar

// dependencies
- commons-codec-1.3.jar
- commons-logging.jar
- jdom-1.0.jar

[1] http://issues.apache.org/jira/browse/VFS-74


if it is really not working, could you please provide more information, 
e.g. stack trace.


@jason: could you answer the remaining question: are there thoughts on 
doing a new release? i think this would be a good idea!


cheers,
stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by jwcarman <ja...@carmanconsulting.com>.
Are there thoughts on doing a new release.  We really need webdav working in
VFS and the core VFS code in the sandbox just doesn't work.  One simple test
(connecting to a webdav directory and listing its contents) doesn't work out
of the box.  I can't get the webdavclient4j webdav vfs provider to work
either.  I get an IllegalStateException ("this should not happen").


jharrop wrote:
> 
> 
> Stephan Schuster-3 wrote:
>> 
>>  so i checked out the code of 
>> webdavclient4j and fixed it along with the implementation of an 
>> additional provider: webdavs (webdav over https). afterwards i posted 
>> the patch to the website's forum [3] and sent it per mail to jason 
>> harrop. so far he obviously hadn't had the time to apply the patch and 
>> release a new version of webdavclient4j. that's why you have to checkout 
>> webdavclient4j, patch it with the stuff i wrote, build it yourself and 
>> then use it with commons-vfs. 
> 
> Hi Stephan
> 
> I did apply the patch in svn [1], but haven't released a new version yet.
> 
> So he'll need to check out the sources and build it, but at least won't
> need to patch.
> 
> cheers
> 
> Jason
> 
> [1]
> http://webdavclient4j.svn.sourceforge.net/viewvc/webdavclient4j?view=rev&revision=15
> 

-- 
View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17757712.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by jharrop <ja...@plutext.org>.

Stephan Schuster-3 wrote:
> 
>  so i checked out the code of 
> webdavclient4j and fixed it along with the implementation of an 
> additional provider: webdavs (webdav over https). afterwards i posted 
> the patch to the website's forum [3] and sent it per mail to jason 
> harrop. so far he obviously hadn't had the time to apply the patch and 
> release a new version of webdavclient4j. that's why you have to checkout 
> webdavclient4j, patch it with the stuff i wrote, build it yourself and 
> then use it with commons-vfs. 

Hi Stephan

I did apply the patch in svn [1], but haven't released a new version yet.

So he'll need to check out the sources and build it, but at least won't need
to patch.

cheers

Jason

[1]
http://webdavclient4j.svn.sourceforge.net/viewvc/webdavclient4j?view=rev&revision=15
-- 
View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17684007.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Yannick PIERSON <pi...@gmail.com>.
Hi Jason,

I've done what you write in your previous post and it's working well know.
If anyone wants more informations I will be able to help him.

Thanks for your helpfull,

Regards,

Yannick


2008/6/7 jharrop <ja...@plutext.org>:

>
>
> Yannick PIERSON wrote:
> >
> > I've done what you have explain to me. For webdav it's working now, but i
> > can't access to a share folder on windows thanks to smb protocol. Is
> there
> > an another library to perform that?
> >
>
> The webdavclient4j distribution includes a modified version of the WebDAV
> provider from vfs sandbox.
>
> The smb provider is also in the vfs sandbox.  It is not currently included
> in the build of commons-vfs we include (sounds like it should be).
>
> If you have already downloaded webdavclient4j sources, you could copy the
> smb provider into the webdavclient4j source tree, and rebuild.
>
> Don't forget vfs-providers.xml, from sandbox resources, which declares the
> smb provider.
>
> cheers
>
> Jason
>
> --
> View this message in context:
> http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17705472.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: VFS problem with StaticUserAuthenticator

Posted by jharrop <ja...@plutext.org>.

Yannick PIERSON wrote:
> 
> I've done what you have explain to me. For webdav it's working now, but i
> can't access to a share folder on windows thanks to smb protocol. Is there
> an another library to perform that?
> 

The webdavclient4j distribution includes a modified version of the WebDAV
provider from vfs sandbox.

The smb provider is also in the vfs sandbox.  It is not currently included
in the build of commons-vfs we include (sounds like it should be).  

If you have already downloaded webdavclient4j sources, you could copy the
smb provider into the webdavclient4j source tree, and rebuild. 

Don't forget vfs-providers.xml, from sandbox resources, which declares the
smb provider.

cheers

Jason
 
-- 
View this message in context: http://www.nabble.com/VFS-problem-with-StaticUserAuthenticator-tp17671909p17705472.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Yannick PIERSON <pi...@gmail.com>.
Hi,

I've found jCIFS library for smb protocol, but it doesn't work with
vfsjfilechooser. If you have any idea?

Thanks,

Yannick

2008/6/6 Yannick PIERSON <pi...@gmail.com>:

> Hi,
>
> I've done what you have explain to me. For webdav it's working now, but i
> can't access to a share folder on windows thanks to smb protocol. Is there
> an another library to perform that?
>
> My error:
> INFO: Using "C:\DOCUME~1\pierson\LOCALS~1\Temp\vfs_cache" as temporary
> files store.
> 6 juin 2008 11:37:45 test.UserApplicatif resolveFile
> GRAVE: null
> org.apache.commons.vfs.FileSystemException: Badly formed URI
> "smb://host:445/share_windows/test.txt".
>         at
> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:85)
>         at
> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:662)
>         at
> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
>         at test.UserApplicatif.resolveFile(UserApplicatif.java:83)
>         at test.TestUserApp.main(TestUserApp.java:28)
> Caused by: java.net.MalformedURLException: unknown protocol: smb
>         at java.net.URL.<init>(URL.java:574)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at
> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:66)
>         ... 4 more
> Exception in thread "main" java.lang.NullPointerException
>
>
> 2008/6/6 Stephan Schuster <st...@wilken.de>:
>
> hi yannick!
>>
>>  Is the code working with a newer version of httpclient than
>>> 2.0.2<http://2.0.2./>or must I use the patch you have posted to the
>>> forum ?
>>>
>>
>> here is what you have to do to use commons-vfs with webdav based on
>> httpclient 3.0.1 (probably even 3.1 - i havn't tested it yet but there where
>> posting that it should work with 3.1 as well, i'm sure it will!):
>>
>> - in order to use commons-vfs jars with httpclient 3.0.1 you have to patch
>> commons-vfs (see [1])
>> - you have to use the webdavclient4j jars instead of the jakarta slide
>> jars
>>
>> the easiest way to achieve all this is to checkout webdavclient4j (see
>> [2]) and execute the ant target called "all". amongst others this will
>> generate a folder named "dist/vfs/lib" which contains all jars you need:
>>
>> // httpclient
>> - commons-httpclient-3.0.1.jar
>>
>> // commons-vfs (patched with vfs-74)
>> - commons-vfs-1.1-patched-hc301-SNAPSHOT.jar
>>
>> // the core webdav functionality (replaces slide)
>> - webdavclient4j-core-0.91.jar
>>
>> // webdav providers for vfs -> the bridge between webdavclient4j and vfs
>> (replaces vfs-sandbox stuff)
>> - webdavclient4j-vfs-0.91.jar
>>
>> // dependencies
>> - commons-codec-1.3.jar
>> - commons-logging.jar
>> - jdom-1.0.jar
>>
>>
>> [1] http://issues.apache.org/jira/browse/VFS-74
>> [2] http://sourceforge.net/svn/?group_id=223624
>>
>>
>> cheers,
>> stephan
>>
>>
>>
>>
>>
>>
>>> Thanks a lot for your help,
>>>
>>> Yannick
>>>
>>> 2008/6/5 Stephan Schuster <st...@wilken.de>:
>>>
>>>  hi yannick,
>>>>
>>>> the short answer: i had the same problem about a week ago and fixed it!
>>>>
>>>> the long answer: as you probably know commons-vfs uses jakarta slide for
>>>> its webdav support. however, jakarta slide unfortunately retired at the
>>>> of
>>>> 2007. that's why jason harrop startet webdavclient4j [1] a few weeks
>>>> ago. it
>>>> is a new project that basically ports and improves the slide sources,
>>>> for
>>>> example you can use a newer version of httpclient than 2.0.2. but most
>>>> important it integrates nicely with commons-vfs and vfsjfilechooser. i
>>>> use
>>>> both in my current project.
>>>>
>>>> now, why am i telling you this???
>>>>
>>>> because i experienced the same problem a few weeks ago. the reason is
>>>> that
>>>> the webdav provider (of jakarta slide / webdavclient4j) does not respect
>>>> the
>>>> credentials set via StaticUserAuthenticator and
>>>> DefaultFileSystemConfigBuilder. so i checked out the code of
>>>> webdavclient4j
>>>> and fixed it along with the implementation of an additional provider:
>>>> webdavs (webdav over https). afterwards i posted the patch to the
>>>> website's
>>>> forum [3] and sent it per mail to jason harrop. so far he obviously
>>>> hadn't
>>>> had the time to apply the patch and release a new version of
>>>> webdavclient4j.
>>>> that's why you have to checkout webdavclient4j, patch it with the stuff
>>>> i
>>>> wrote, build it yourself and then use it with commons-vfs. of course you
>>>> could do the same with jakarta slide but i wouldn't recommend that since
>>>> it's a dead project. besides that i could send you my build of
>>>> webdavclient4j but i'm not sure if that is what jason harrop wants. so i
>>>> can't do this unless he tells me to do so.
>>>>
>>>> hope that helps.
>>>>
>>>>
>>>> cheers,
>>>> stephan
>>>>
>>>> ps: @jason: if you want you could grant me developer rights for your
>>>> projects. then i could do the necessary stuff myself and help yannick.
>>>>
>>>>
>>>> [1] http://sourceforge.net/projects/webdavclient4j/
>>>> [2] http://vfsjfilechooser.sourceforge.net
>>>> [3]
>>>> http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778
>>>>
>>>>
>>>>
>>>>
>>>> Yannick PIERSON wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> I'm using commons VFS and  I get a problem.
>>>>>
>>>>> To access to virtual file system, I'm using this authentification :
>>>>> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
>>>>> credentials.getUsername(), credentials.getPassword());
>>>>>
>>>>> This code works whith smb protocol (share windows), but doesn't work
>>>>> with
>>>>> webdav :
>>>>> For it I must write the url -> webdav://user:password@host
>>>>> :port/directory.
>>>>> And this code works...
>>>>>
>>>>> But I want to use the same authentification that I'm using for smb.
>>>>>
>>>>> Do you know why it doesn't work ?
>>>>>
>>>>> I think my problem is on the realm definition.
>>>>>
>>>>> My error trace :
>>>>> ATTENTION: No credentials available for the 'WORKGROUP' authentication
>>>>> realm
>>>>> at host
>>>>> Exception in thread "main" org.apache.commons.vfs.FileSystemException:
>>>>> Could
>>>>> not determine the type of file "webdav://host/directory/testFile.txt".
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>>>>>       at test.UserApp.main(UserApp.java:38)
>>>>> Caused by: org.apache.commons.vfs.FileSystemException
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>>>>>       ... 3 more
>>>>> Caused by: org.apache.commons.httpclient.HttpException
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>>>>>       at
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>>>>>       ... 5 more
>>>>>
>>>>> Regards,
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>>>
>> --
>>
>> Viele Grüße,
>> Stephan Schuster
>> __________________________________________________________
>>
>> Abt.: Systementwicklung       Wilken GmbH
>> Tel: (+49)0731/9650-324       Software. Menschen. Service.
>> Fax: (+49)0731/9650-767
>> E-Mail: stsch@wilken.de       Hörvelsinger Weg 25-29
>> Internet: www.wilken.de       D-89081 Ulm
>>
>> Wilken GmbH, HRB Ulm 794, GF: Dr. Andreas Lied
>> __________________________________________________________
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>

Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi yannick,

i've no experiences with smb over commons-vfs but i am pretty sure that 
it works - at least basically. before looking after another library i 
would recommend to track down the errors you receive with vfs. for 
example you should try to figure out why the url you provided is "badly 
formed" even though it looks ok on the first glimpse.

maybe there are other who have more experiences in this area.


good luck,
stephan


Yannick PIERSON wrote:
> Hi,
> 
> I've done what you have explain to me. For webdav it's working now, but i
> can't access to a share folder on windows thanks to smb protocol. Is there
> an another library to perform that?
> 
> My error:
> INFO: Using "C:\DOCUME~1\pierson\LOCALS~1\Temp\vfs_cache" as temporary files
> store.
> 6 juin 2008 11:37:45 test.UserApplicatif resolveFile
> GRAVE: null
> org.apache.commons.vfs.FileSystemException: Badly formed URI
> "smb://host:445/share_windows/test.txt".
>         at
> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:85)
>         at
> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:662)
>         at
> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
>         at test.UserApplicatif.resolveFile(UserApplicatif.java:83)
>         at test.TestUserApp.main(TestUserApp.java:28)
> Caused by: java.net.MalformedURLException: unknown protocol: smb
>         at java.net.URL.<init>(URL.java:574)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at
> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:66)
>         ... 4 more
> Exception in thread "main" java.lang.NullPointerException
> 
> 
> 2008/6/6 Stephan Schuster <st...@wilken.de>:
> 
>> hi yannick!
>>
>>  Is the code working with a newer version of httpclient than
>>> 2.0.2<http://2.0.2./>or must I use the patch you have posted to the
>>> forum ?
>>>
>> here is what you have to do to use commons-vfs with webdav based on
>> httpclient 3.0.1 (probably even 3.1 - i havn't tested it yet but there where
>> posting that it should work with 3.1 as well, i'm sure it will!):
>>
>> - in order to use commons-vfs jars with httpclient 3.0.1 you have to patch
>> commons-vfs (see [1])
>> - you have to use the webdavclient4j jars instead of the jakarta slide jars
>>
>> the easiest way to achieve all this is to checkout webdavclient4j (see [2])
>> and execute the ant target called "all". amongst others this will generate a
>> folder named "dist/vfs/lib" which contains all jars you need:
>>
>> // httpclient
>> - commons-httpclient-3.0.1.jar
>>
>> // commons-vfs (patched with vfs-74)
>> - commons-vfs-1.1-patched-hc301-SNAPSHOT.jar
>>
>> // the core webdav functionality (replaces slide)
>> - webdavclient4j-core-0.91.jar
>>
>> // webdav providers for vfs -> the bridge between webdavclient4j and vfs
>> (replaces vfs-sandbox stuff)
>> - webdavclient4j-vfs-0.91.jar
>>
>> // dependencies
>> - commons-codec-1.3.jar
>> - commons-logging.jar
>> - jdom-1.0.jar
>>
>>
>> [1] http://issues.apache.org/jira/browse/VFS-74
>> [2] http://sourceforge.net/svn/?group_id=223624
>>
>>
>> cheers,
>> stephan
>>
>>
>>
>>
>>
>>
>>> Thanks a lot for your help,
>>>
>>> Yannick
>>>
>>> 2008/6/5 Stephan Schuster <st...@wilken.de>:
>>>
>>>  hi yannick,
>>>> the short answer: i had the same problem about a week ago and fixed it!
>>>>
>>>> the long answer: as you probably know commons-vfs uses jakarta slide for
>>>> its webdav support. however, jakarta slide unfortunately retired at the
>>>> of
>>>> 2007. that's why jason harrop startet webdavclient4j [1] a few weeks ago.
>>>> it
>>>> is a new project that basically ports and improves the slide sources, for
>>>> example you can use a newer version of httpclient than 2.0.2. but most
>>>> important it integrates nicely with commons-vfs and vfsjfilechooser. i
>>>> use
>>>> both in my current project.
>>>>
>>>> now, why am i telling you this???
>>>>
>>>> because i experienced the same problem a few weeks ago. the reason is
>>>> that
>>>> the webdav provider (of jakarta slide / webdavclient4j) does not respect
>>>> the
>>>> credentials set via StaticUserAuthenticator and
>>>> DefaultFileSystemConfigBuilder. so i checked out the code of
>>>> webdavclient4j
>>>> and fixed it along with the implementation of an additional provider:
>>>> webdavs (webdav over https). afterwards i posted the patch to the
>>>> website's
>>>> forum [3] and sent it per mail to jason harrop. so far he obviously
>>>> hadn't
>>>> had the time to apply the patch and release a new version of
>>>> webdavclient4j.
>>>> that's why you have to checkout webdavclient4j, patch it with the stuff i
>>>> wrote, build it yourself and then use it with commons-vfs. of course you
>>>> could do the same with jakarta slide but i wouldn't recommend that since
>>>> it's a dead project. besides that i could send you my build of
>>>> webdavclient4j but i'm not sure if that is what jason harrop wants. so i
>>>> can't do this unless he tells me to do so.
>>>>
>>>> hope that helps.
>>>>
>>>>
>>>> cheers,
>>>> stephan
>>>>
>>>> ps: @jason: if you want you could grant me developer rights for your
>>>> projects. then i could do the necessary stuff myself and help yannick.
>>>>
>>>>
>>>> [1] http://sourceforge.net/projects/webdavclient4j/
>>>> [2] http://vfsjfilechooser.sourceforge.net
>>>> [3]
>>>> http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778
>>>>
>>>>
>>>>
>>>>
>>>> Yannick PIERSON wrote:
>>>>
>>>>  Hi,
>>>>> I'm using commons VFS and  I get a problem.
>>>>>
>>>>> To access to virtual file system, I'm using this authentification :
>>>>> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
>>>>> credentials.getUsername(), credentials.getPassword());
>>>>>
>>>>> This code works whith smb protocol (share windows), but doesn't work
>>>>> with
>>>>> webdav :
>>>>> For it I must write the url -> webdav://user:password@host
>>>>> :port/directory.
>>>>> And this code works...
>>>>>
>>>>> But I want to use the same authentification that I'm using for smb.
>>>>>
>>>>> Do you know why it doesn't work ?
>>>>>
>>>>> I think my problem is on the realm definition.
>>>>>
>>>>> My error trace :
>>>>> ATTENTION: No credentials available for the 'WORKGROUP' authentication
>>>>> realm
>>>>> at host
>>>>> Exception in thread "main" org.apache.commons.vfs.FileSystemException:
>>>>> Could
>>>>> not determine the type of file "webdav://host/directory/testFile.txt".
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>>>>>       at test.UserApp.main(UserApp.java:38)
>>>>> Caused by: org.apache.commons.vfs.FileSystemException
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>>>>>       ... 3 more
>>>>> Caused by: org.apache.commons.httpclient.HttpException
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>>>>>       at
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>>>>>       at
>>>>>
>>>>>
>>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>>>>>       ... 5 more
>>>>>
>>>>> Regards,
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>> --
>>
>> Viele Grüße,
>> Stephan Schuster
>> __________________________________________________________
>>
>> Abt.: Systementwicklung       Wilken GmbH
>> Tel: (+49)0731/9650-324       Software. Menschen. Service.
>> Fax: (+49)0731/9650-767
>> E-Mail: stsch@wilken.de       Hörvelsinger Weg 25-29
>> Internet: www.wilken.de       D-89081 Ulm
>>
>> Wilken GmbH, HRB Ulm 794, GF: Dr. Andreas Lied
>> __________________________________________________________
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
> 

-- 

Viele Grüße,
Stephan Schuster
__________________________________________________________

Abt.: Systementwicklung       Wilken GmbH
Tel: (+49)0731/9650-324       Software. Menschen. Service.
Fax: (+49)0731/9650-767
E-Mail: stsch@wilken.de       Hörvelsinger Weg 25-29
Internet: www.wilken.de       D-89081 Ulm

Wilken GmbH, HRB Ulm 794, GF: Dr. Andreas Lied
__________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Yannick PIERSON <pi...@gmail.com>.
Hi,

I've done what you have explain to me. For webdav it's working now, but i
can't access to a share folder on windows thanks to smb protocol. Is there
an another library to perform that?

My error:
INFO: Using "C:\DOCUME~1\pierson\LOCALS~1\Temp\vfs_cache" as temporary files
store.
6 juin 2008 11:37:45 test.UserApplicatif resolveFile
GRAVE: null
org.apache.commons.vfs.FileSystemException: Badly formed URI
"smb://host:445/share_windows/test.txt".
        at
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:85)
        at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:662)
        at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
        at test.UserApplicatif.resolveFile(UserApplicatif.java:83)
        at test.TestUserApp.main(TestUserApp.java:28)
Caused by: java.net.MalformedURLException: unknown protocol: smb
        at java.net.URL.<init>(URL.java:574)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at
org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:66)
        ... 4 more
Exception in thread "main" java.lang.NullPointerException


2008/6/6 Stephan Schuster <st...@wilken.de>:

> hi yannick!
>
>  Is the code working with a newer version of httpclient than
>> 2.0.2<http://2.0.2./>or must I use the patch you have posted to the
>> forum ?
>>
>
> here is what you have to do to use commons-vfs with webdav based on
> httpclient 3.0.1 (probably even 3.1 - i havn't tested it yet but there where
> posting that it should work with 3.1 as well, i'm sure it will!):
>
> - in order to use commons-vfs jars with httpclient 3.0.1 you have to patch
> commons-vfs (see [1])
> - you have to use the webdavclient4j jars instead of the jakarta slide jars
>
> the easiest way to achieve all this is to checkout webdavclient4j (see [2])
> and execute the ant target called "all". amongst others this will generate a
> folder named "dist/vfs/lib" which contains all jars you need:
>
> // httpclient
> - commons-httpclient-3.0.1.jar
>
> // commons-vfs (patched with vfs-74)
> - commons-vfs-1.1-patched-hc301-SNAPSHOT.jar
>
> // the core webdav functionality (replaces slide)
> - webdavclient4j-core-0.91.jar
>
> // webdav providers for vfs -> the bridge between webdavclient4j and vfs
> (replaces vfs-sandbox stuff)
> - webdavclient4j-vfs-0.91.jar
>
> // dependencies
> - commons-codec-1.3.jar
> - commons-logging.jar
> - jdom-1.0.jar
>
>
> [1] http://issues.apache.org/jira/browse/VFS-74
> [2] http://sourceforge.net/svn/?group_id=223624
>
>
> cheers,
> stephan
>
>
>
>
>
>
>> Thanks a lot for your help,
>>
>> Yannick
>>
>> 2008/6/5 Stephan Schuster <st...@wilken.de>:
>>
>>  hi yannick,
>>>
>>> the short answer: i had the same problem about a week ago and fixed it!
>>>
>>> the long answer: as you probably know commons-vfs uses jakarta slide for
>>> its webdav support. however, jakarta slide unfortunately retired at the
>>> of
>>> 2007. that's why jason harrop startet webdavclient4j [1] a few weeks ago.
>>> it
>>> is a new project that basically ports and improves the slide sources, for
>>> example you can use a newer version of httpclient than 2.0.2. but most
>>> important it integrates nicely with commons-vfs and vfsjfilechooser. i
>>> use
>>> both in my current project.
>>>
>>> now, why am i telling you this???
>>>
>>> because i experienced the same problem a few weeks ago. the reason is
>>> that
>>> the webdav provider (of jakarta slide / webdavclient4j) does not respect
>>> the
>>> credentials set via StaticUserAuthenticator and
>>> DefaultFileSystemConfigBuilder. so i checked out the code of
>>> webdavclient4j
>>> and fixed it along with the implementation of an additional provider:
>>> webdavs (webdav over https). afterwards i posted the patch to the
>>> website's
>>> forum [3] and sent it per mail to jason harrop. so far he obviously
>>> hadn't
>>> had the time to apply the patch and release a new version of
>>> webdavclient4j.
>>> that's why you have to checkout webdavclient4j, patch it with the stuff i
>>> wrote, build it yourself and then use it with commons-vfs. of course you
>>> could do the same with jakarta slide but i wouldn't recommend that since
>>> it's a dead project. besides that i could send you my build of
>>> webdavclient4j but i'm not sure if that is what jason harrop wants. so i
>>> can't do this unless he tells me to do so.
>>>
>>> hope that helps.
>>>
>>>
>>> cheers,
>>> stephan
>>>
>>> ps: @jason: if you want you could grant me developer rights for your
>>> projects. then i could do the necessary stuff myself and help yannick.
>>>
>>>
>>> [1] http://sourceforge.net/projects/webdavclient4j/
>>> [2] http://vfsjfilechooser.sourceforge.net
>>> [3]
>>> http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778
>>>
>>>
>>>
>>>
>>> Yannick PIERSON wrote:
>>>
>>>  Hi,
>>>>
>>>> I'm using commons VFS and  I get a problem.
>>>>
>>>> To access to virtual file system, I'm using this authentification :
>>>> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
>>>> credentials.getUsername(), credentials.getPassword());
>>>>
>>>> This code works whith smb protocol (share windows), but doesn't work
>>>> with
>>>> webdav :
>>>> For it I must write the url -> webdav://user:password@host
>>>> :port/directory.
>>>> And this code works...
>>>>
>>>> But I want to use the same authentification that I'm using for smb.
>>>>
>>>> Do you know why it doesn't work ?
>>>>
>>>> I think my problem is on the realm definition.
>>>>
>>>> My error trace :
>>>> ATTENTION: No credentials available for the 'WORKGROUP' authentication
>>>> realm
>>>> at host
>>>> Exception in thread "main" org.apache.commons.vfs.FileSystemException:
>>>> Could
>>>> not determine the type of file "webdav://host/directory/testFile.txt".
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>>>>       at test.UserApp.main(UserApp.java:38)
>>>> Caused by: org.apache.commons.vfs.FileSystemException
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>>>>       ... 3 more
>>>> Caused by: org.apache.commons.httpclient.HttpException
>>>>       at
>>>>
>>>>
>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>>>>       at
>>>>
>>>>
>>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>>>>       at
>>>>
>>>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>>>>       at
>>>>
>>>>
>>>> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>>>>       at
>>>>
>>>>
>>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>>>>       at
>>>>
>>>>
>>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>>>>       ... 5 more
>>>>
>>>> Regards,
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>
> --
>
> Viele Grüße,
> Stephan Schuster
> __________________________________________________________
>
> Abt.: Systementwicklung       Wilken GmbH
> Tel: (+49)0731/9650-324       Software. Menschen. Service.
> Fax: (+49)0731/9650-767
> E-Mail: stsch@wilken.de       Hörvelsinger Weg 25-29
> Internet: www.wilken.de       D-89081 Ulm
>
> Wilken GmbH, HRB Ulm 794, GF: Dr. Andreas Lied
> __________________________________________________________
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi yannick!

> Is the code working with a newer version of httpclient than
> 2.0.2<http://2.0.2./>or must I use the patch you have posted to the
> forum ?

here is what you have to do to use commons-vfs with webdav based on 
httpclient 3.0.1 (probably even 3.1 - i havn't tested it yet but there 
where posting that it should work with 3.1 as well, i'm sure it will!):

- in order to use commons-vfs jars with httpclient 3.0.1 you have to 
patch commons-vfs (see [1])
- you have to use the webdavclient4j jars instead of the jakarta slide jars

the easiest way to achieve all this is to checkout webdavclient4j (see 
[2]) and execute the ant target called "all". amongst others this will 
generate a folder named "dist/vfs/lib" which contains all jars you need:

// httpclient
- commons-httpclient-3.0.1.jar

// commons-vfs (patched with vfs-74)
- commons-vfs-1.1-patched-hc301-SNAPSHOT.jar

// the core webdav functionality (replaces slide)
- webdavclient4j-core-0.91.jar

// webdav providers for vfs -> the bridge between webdavclient4j and vfs 
(replaces vfs-sandbox stuff)
- webdavclient4j-vfs-0.91.jar

// dependencies
- commons-codec-1.3.jar
- commons-logging.jar
- jdom-1.0.jar


[1] http://issues.apache.org/jira/browse/VFS-74
[2] http://sourceforge.net/svn/?group_id=223624


cheers,
stephan




> 
> Thanks a lot for your help,
> 
> Yannick
> 
> 2008/6/5 Stephan Schuster <st...@wilken.de>:
> 
>> hi yannick,
>>
>> the short answer: i had the same problem about a week ago and fixed it!
>>
>> the long answer: as you probably know commons-vfs uses jakarta slide for
>> its webdav support. however, jakarta slide unfortunately retired at the of
>> 2007. that's why jason harrop startet webdavclient4j [1] a few weeks ago. it
>> is a new project that basically ports and improves the slide sources, for
>> example you can use a newer version of httpclient than 2.0.2. but most
>> important it integrates nicely with commons-vfs and vfsjfilechooser. i use
>> both in my current project.
>>
>> now, why am i telling you this???
>>
>> because i experienced the same problem a few weeks ago. the reason is that
>> the webdav provider (of jakarta slide / webdavclient4j) does not respect the
>> credentials set via StaticUserAuthenticator and
>> DefaultFileSystemConfigBuilder. so i checked out the code of webdavclient4j
>> and fixed it along with the implementation of an additional provider:
>> webdavs (webdav over https). afterwards i posted the patch to the website's
>> forum [3] and sent it per mail to jason harrop. so far he obviously hadn't
>> had the time to apply the patch and release a new version of webdavclient4j.
>> that's why you have to checkout webdavclient4j, patch it with the stuff i
>> wrote, build it yourself and then use it with commons-vfs. of course you
>> could do the same with jakarta slide but i wouldn't recommend that since
>> it's a dead project. besides that i could send you my build of
>> webdavclient4j but i'm not sure if that is what jason harrop wants. so i
>> can't do this unless he tells me to do so.
>>
>> hope that helps.
>>
>>
>> cheers,
>> stephan
>>
>> ps: @jason: if you want you could grant me developer rights for your
>> projects. then i could do the necessary stuff myself and help yannick.
>>
>>
>> [1] http://sourceforge.net/projects/webdavclient4j/
>> [2] http://vfsjfilechooser.sourceforge.net
>> [3]
>> http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778
>>
>>
>>
>>
>> Yannick PIERSON wrote:
>>
>>> Hi,
>>>
>>> I'm using commons VFS and  I get a problem.
>>>
>>> To access to virtual file system, I'm using this authentification :
>>> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
>>> credentials.getUsername(), credentials.getPassword());
>>>
>>> This code works whith smb protocol (share windows), but doesn't work with
>>> webdav :
>>> For it I must write the url -> webdav://user:password@host
>>> :port/directory.
>>> And this code works...
>>>
>>> But I want to use the same authentification that I'm using for smb.
>>>
>>> Do you know why it doesn't work ?
>>>
>>> I think my problem is on the realm definition.
>>>
>>> My error trace :
>>> ATTENTION: No credentials available for the 'WORKGROUP' authentication
>>> realm
>>> at host
>>> Exception in thread "main" org.apache.commons.vfs.FileSystemException:
>>> Could
>>> not determine the type of file "webdav://host/directory/testFile.txt".
>>>        at
>>>
>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>>>        at
>>>
>>> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>>>        at
>>>
>>> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>>>        at test.UserApp.main(UserApp.java:38)
>>> Caused by: org.apache.commons.vfs.FileSystemException
>>>        at
>>>
>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>>>        at
>>>
>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>>>        at
>>>
>>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>>>        ... 3 more
>>> Caused by: org.apache.commons.httpclient.HttpException
>>>        at
>>>
>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>>>        at
>>>
>>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>>>        at
>>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>>>        at
>>>
>>> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>>>        at
>>>
>>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>>>        at
>>>
>>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>>>        ... 5 more
>>>
>>> Regards,
>>>
>>> Thanks,
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
> 

-- 

Viele Grüße,
Stephan Schuster
__________________________________________________________

Abt.: Systementwicklung       Wilken GmbH
Tel: (+49)0731/9650-324       Software. Menschen. Service.
Fax: (+49)0731/9650-767
E-Mail: stsch@wilken.de       Hörvelsinger Weg 25-29
Internet: www.wilken.de       D-89081 Ulm

Wilken GmbH, HRB Ulm 794, GF: Dr. Andreas Lied
__________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: VFS problem with StaticUserAuthenticator

Posted by Yannick PIERSON <pi...@gmail.com>.
Hi Stephan,

I'm french and I'm not so good in english.
So I have a question:
Is the code working with a newer version of httpclient than
2.0.2<http://2.0.2./>or must I use the patch you have posted to the
forum ?

Thanks a lot for your help,

Yannick

2008/6/5 Stephan Schuster <st...@wilken.de>:

> hi yannick,
>
> the short answer: i had the same problem about a week ago and fixed it!
>
> the long answer: as you probably know commons-vfs uses jakarta slide for
> its webdav support. however, jakarta slide unfortunately retired at the of
> 2007. that's why jason harrop startet webdavclient4j [1] a few weeks ago. it
> is a new project that basically ports and improves the slide sources, for
> example you can use a newer version of httpclient than 2.0.2. but most
> important it integrates nicely with commons-vfs and vfsjfilechooser. i use
> both in my current project.
>
> now, why am i telling you this???
>
> because i experienced the same problem a few weeks ago. the reason is that
> the webdav provider (of jakarta slide / webdavclient4j) does not respect the
> credentials set via StaticUserAuthenticator and
> DefaultFileSystemConfigBuilder. so i checked out the code of webdavclient4j
> and fixed it along with the implementation of an additional provider:
> webdavs (webdav over https). afterwards i posted the patch to the website's
> forum [3] and sent it per mail to jason harrop. so far he obviously hadn't
> had the time to apply the patch and release a new version of webdavclient4j.
> that's why you have to checkout webdavclient4j, patch it with the stuff i
> wrote, build it yourself and then use it with commons-vfs. of course you
> could do the same with jakarta slide but i wouldn't recommend that since
> it's a dead project. besides that i could send you my build of
> webdavclient4j but i'm not sure if that is what jason harrop wants. so i
> can't do this unless he tells me to do so.
>
> hope that helps.
>
>
> cheers,
> stephan
>
> ps: @jason: if you want you could grant me developer rights for your
> projects. then i could do the necessary stuff myself and help yannick.
>
>
> [1] http://sourceforge.net/projects/webdavclient4j/
> [2] http://vfsjfilechooser.sourceforge.net
> [3]
> http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778
>
>
>
>
> Yannick PIERSON wrote:
>
>> Hi,
>>
>> I'm using commons VFS and  I get a problem.
>>
>> To access to virtual file system, I'm using this authentification :
>> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
>> credentials.getUsername(), credentials.getPassword());
>>
>> This code works whith smb protocol (share windows), but doesn't work with
>> webdav :
>> For it I must write the url -> webdav://user:password@host
>> :port/directory.
>> And this code works...
>>
>> But I want to use the same authentification that I'm using for smb.
>>
>> Do you know why it doesn't work ?
>>
>> I think my problem is on the realm definition.
>>
>> My error trace :
>> ATTENTION: No credentials available for the 'WORKGROUP' authentication
>> realm
>> at host
>> Exception in thread "main" org.apache.commons.vfs.FileSystemException:
>> Could
>> not determine the type of file "webdav://host/directory/testFile.txt".
>>        at
>>
>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>>        at
>>
>> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>>        at
>>
>> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>>        at test.UserApp.main(UserApp.java:38)
>> Caused by: org.apache.commons.vfs.FileSystemException
>>        at
>>
>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>>        at
>>
>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>>        at
>>
>> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>>        ... 3 more
>> Caused by: org.apache.commons.httpclient.HttpException
>>        at
>>
>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>>        at
>>
>> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>>        at
>> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>>        at
>>
>> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>>        at
>>
>> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>>        at
>>
>> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>>        ... 5 more
>>
>> Regards,
>>
>> Thanks,
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: VFS problem with StaticUserAuthenticator

Posted by Stephan Schuster <st...@wilken.de>.
hi yannick,

the short answer: i had the same problem about a week ago and fixed it!

the long answer: as you probably know commons-vfs uses jakarta slide for 
its webdav support. however, jakarta slide unfortunately retired at the 
of 2007. that's why jason harrop startet webdavclient4j [1] a few weeks 
ago. it is a new project that basically ports and improves the slide 
sources, for example you can use a newer version of httpclient than 
2.0.2. but most important it integrates nicely with commons-vfs and 
vfsjfilechooser. i use both in my current project.

now, why am i telling you this???

because i experienced the same problem a few weeks ago. the reason is 
that the webdav provider (of jakarta slide / webdavclient4j) does not 
respect the credentials set via StaticUserAuthenticator and 
DefaultFileSystemConfigBuilder. so i checked out the code of 
webdavclient4j and fixed it along with the implementation of an 
additional provider: webdavs (webdav over https). afterwards i posted 
the patch to the website's forum [3] and sent it per mail to jason 
harrop. so far he obviously hadn't had the time to apply the patch and 
release a new version of webdavclient4j. that's why you have to checkout 
webdavclient4j, patch it with the stuff i wrote, build it yourself and 
then use it with commons-vfs. of course you could do the same with 
jakarta slide but i wouldn't recommend that since it's a dead project. 
besides that i could send you my build of webdavclient4j but i'm not 
sure if that is what jason harrop wants. so i can't do this unless he 
tells me to do so.

hope that helps.


cheers,
stephan

ps: @jason: if you want you could grant me developer rights for your 
projects. then i could do the necessary stuff myself and help yannick.


[1] http://sourceforge.net/projects/webdavclient4j/
[2] http://vfsjfilechooser.sourceforge.net
[3] http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778



Yannick PIERSON wrote:
> Hi,
> 
> I'm using commons VFS and  I get a problem.
> 
> To access to virtual file system, I'm using this authentification :
> this.auth = new StaticUserAuthenticator(credentials.getDomain(),
> credentials.getUsername(), credentials.getPassword());
> 
> This code works whith smb protocol (share windows), but doesn't work with
> webdav :
> For it I must write the url -> webdav://user:password@host:port/directory.
> And this code works...
> 
> But I want to use the same authentification that I'm using for smb.
> 
> Do you know why it doesn't work ?
> 
> I think my problem is on the realm definition.
> 
> My error trace :
> ATTENTION: No credentials available for the 'WORKGROUP' authentication realm
> at host
> Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
> not determine the type of file "webdav://host/directory/testFile.txt".
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
>         at test.UserApp.main(UserApp.java:38)
> Caused by: org.apache.commons.vfs.FileSystemException
>         at
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
>         at
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
>         at
> org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
>         ... 3 more
> Caused by: org.apache.commons.httpclient.HttpException
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
>         at
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
>         at
> org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
>         at
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
>         at
> org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
>         ... 5 more
> 
> Regards,
> 
> Thanks,
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org