On Wednesday 04 April 2007 10:36, Philippe Poulard wrote:
> Kostis Anagnostopoulos wrote:
> > Hi,
> >
> > I've been trying to build a stripped-down version of VFS fileSystem
> > manager and i'm having problem with the sandboxed providers.
> >
> > Since the name of the included within-the-jar configuration file is
> > vfs-providers.xml, i think it triggers its discovery by the fileSystem
> > manager and it is always included.
> >
> > So i cannot use a
> > StandardFileSystemManager.configure("my-providers-only.xml") because
> > i'm getting a:
> >
> > org.apache.commons.vfs.FileSystemException: Multiple providers
> > registered for URL scheme "smb".
> > at
> > org.apache.commons.vfs.impl.DefaultFileSystemManager.addProvider(DefaultF
> >ileSystemManager.java:174)
> >
> > at
> > org.apache.commons.vfs.impl.StandardFileSystemManager.addProvider(Standar
> >dFileSystemManager.java:354)
> >
> > at
> > org.apache.commons.vfs.impl.StandardFileSystemManager.configure(StandardF
> >ileSystemManager.java:254)
> >
> > at
> > org.apache.commons.vfs.impl.StandardFileSystemManager.configure(StandardF
> >ileSystemManager.java:187)
> >
> > ... 29 more
> >
> >
> >
> > Notice that this error happens EVEN WHEN myproviders-only.xml file
> > DOES NOT SPECIFY the smb provider!
> >
> >
> > Any ideas on how to circumvent this?
>
> hi,
>
> instead of doing this :
> StandardFileSystemManager fsm = (StandardFileSystemManager)
> VFS.getManager();
>
> try this :
> StandardFileSystemManager fsm = new StandardFileSystemManager();
> fsm.setConfiguration( YourClass.class.getResource(
> "my-providers-only.xml" ) );
> fsm.init();
> String dir = System.getProperty( "user.dir" );
> fsm.setBaseFile( new File( dir ) );
> fsm.setDefaultProvider( new FallbackFileProvider() );
Thank you Philippe for your time,
I was already using the correct configuration procedure, and not:
StandardFileSystemManager fsm = (StandardFileSystemManager)
VFS.getManager();
I cannot see the reason for the last 3 lines concerning the defaultProvider.
I solved my problem, see the response to Mario Ivankovits's mail, thank you
anyway.
But i really need to disable the temporary file store, since im'm running
under a clustered JEE application server and it is not a good habbit to use
the filesystem.
Any ideas on how t disable temporary file store?
Regards,
Kostis
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]