commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kostis Anagnostopoulos <ankos...@gmail.com>
Subject Re: [vfs] vfs-sandbox jar 's vfs-providers.xml gets auto-loaded even when manually configuring
Date Wed, 04 Apr 2007 11:32:48 GMT
On Wednesday 04 April 2007 08:04, Mario Ivankovits wrote:
> Hi Kostis!
>
> > 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!
>
> This is strange, do you have some time to debug into VFS to see whats
> going on?


I don't find it strange; I believe it is obvious what happens: 
The "vfs-providers.xml" included into the sandbox jar gets auto-loaded (by 
the specs).

I did try to build a sample m2 project, but i didn't debug it.  If you need it 
for testing purposes i can attach it if neccessary.

BUGFIX: The solution would be to remove the "vfs-providers.xml" file from the 
sandbox completely, and put its content into the core jar's 
core/src/main/java/org/apache/commons/vfs/impl/providers.xml.

(When sandbox is not included, there won't be any problem since the repective 
classes won't exist, and it would skip the providers).


I just removed the "vfs-providers.xml" file and release internally the  
commons-vfs-sandbox-1.0-MY.jar


>
> And no, its not possible to suppress the autoloading of
> vfs-providers.xml. Thats the reason why we have done it ;-)
> The only way is to remove this file from the jar.

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


Mime
View raw message