You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jenny Kwan <me...@jennykwan.org> on 2023/07/31 04:29:46 UTC
VFS: Multiple providers registered for URL scheme "file"
Hi,
I'm getting started with VFS, using version 2.9.0. I'm calling
`VFS.getManager().init()`, and getting the exception:
org.apache.commons.vfs2.FileSystemException: Multiple providers registered
for URL scheme "file".
This is the cause of:
org.apache.commons.vfs2.FileSystemException: Could not load VFS
configuration from
"jar:file:/home/<home>/.m2/repository/org/apache/commons/commons-vfs2/2.9.0/commons-vfs2-2.9.0.jar!/org/apache/commons/vfs2/impl/providers.xml".
I checked out the jar and it looks fine; the providers.xml file has the
single provider for the file scheme, right after the default
UrlFileProvider.
I happen to be using Clojure with Leiningen. I checked out `lein classpath`
and there's no duplicate entry for this jar.
What should I be looking for?
Thanks,
Jenny
Re: VFS: Multiple providers registered for URL scheme "file"
Posted by Gary Gregory <ga...@gmail.com>.
Hello Jenny,
You should not need to call init(). That's likely the cause of the problem.
Gary
On Mon, Jul 31, 2023, 12:30 AM Jenny Kwan <me...@jennykwan.org> wrote:
> Hi,
>
> I'm getting started with VFS, using version 2.9.0. I'm calling
> `VFS.getManager().init()`, and getting the exception:
>
> org.apache.commons.vfs2.FileSystemException: Multiple providers registered
> for URL scheme "file".
>
> This is the cause of:
>
> org.apache.commons.vfs2.FileSystemException: Could not load VFS
> configuration from
>
> "jar:file:/home/<home>/.m2/repository/org/apache/commons/commons-vfs2/2.9.0/commons-vfs2-2.9.0.jar!/org/apache/commons/vfs2/impl/providers.xml".
>
> I checked out the jar and it looks fine; the providers.xml file has the
> single provider for the file scheme, right after the default
> UrlFileProvider.
>
> I happen to be using Clojure with Leiningen. I checked out `lein classpath`
> and there's no duplicate entry for this jar.
>
> What should I be looking for?
>
> Thanks,
> Jenny
>
Re: Multiple providers registered for URL scheme "file"
Posted by Jenny Kwan <me...@jennykwan.org>.
Hi Bernd,
Thanks! That works!
Thanks,
Jenny
On Sun, Jul 30, 2023 at 10:59 PM Bernd <ec...@zusammenkunft.net> wrote:
> The VFS.getManager() singleton is already I initialized. If you don’t call
> init() it should work.
>
> The examples here don’t use it:
>
> https://commons.apache.org/proper/commons-vfs/api.html
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
>
> ------------------------------
> *Von:* Jenny Kwan <me...@jennykwan.org>
> *Gesendet:* Montag, Juli 31, 2023 6:30 AM
> *An:* user@commons.apache.org <us...@commons.apache.org>
> *Betreff:* VFS: Multiple providers registered for URL scheme "file"
>
> Hi,
>
> I'm getting started with VFS, using version 2.9.0. I'm calling
> `VFS.getManager().init()`, and getting the exception:
>
> org.apache.commons.vfs2.FileSystemException: Multiple providers registered
> for URL scheme "file".
>
> This is the cause of:
>
> org.apache.commons.vfs2.FileSystemException: Could not load VFS
> configuration from
> "jar:file:/home/<home>/.m2/repository/org/apache/commons/commons-vfs2/2.9.0/commons-vfs2-2.9.0.jar!/org/apache/commons/vfs2/impl/providers.xml".
>
>
> I checked out the jar and it looks fine; the providers.xml file has the
> single provider for the file scheme, right after the default
> UrlFileProvider.
>
> I happen to be using Clojure with Leiningen. I checked out `lein
> classpath`
> and there's no duplicate entry for this jar.
>
> What should I be looking for?
>
> Thanks,
> Jenny
>