You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Helge Waastad <he...@waastad.org> on 2015/03/25 17:48:03 UTC

[vfs] FileSystemException: Could not load VFS configuration

Hi,
I'm developing a VFS Resource Adapter and testing it out on TomEE
(1.7.1)

If I bundle the commons-vfs2 (2.1-SNAPSHOT/2.0) with the rar I get then
exception:
FileSystemException: Could not load VFS configuration from
"jar:file:/home/helge/Skrivebord/jca-parent/acme-war/target/apache-tomee/apps/acme-ra-1.0-SNAPSHOT/commons-vfs2-2.1-SNAPSHOT.jar!/org/apache/commons/vfs2/impl/providers.xml"

If I add vfs2-commons to tomee/lib and provided in my rar, then its
working OK.

Is this how it's supposed to work?

PS, the rar has dependencies to a jar having adapter/specs/dependencies
etc.

br hw


Re: [vfs] FileSystemException: Could not load VFS configuration

Posted by Helge Waastad <he...@waastad.org>.
Hi,
and thanks for answering.

I figured it out.

It was a classloader issue.
so by setting classloader on STandardFilesystemMAnager I got it working.

br hw


on., 25.03.2015 kl. 22.17 +0100, skrev Bernd Eckenfels:

> Am Wed, 25 Mar 2015 17:48:03 +0100
> schrieb Helge Waastad <he...@waastad.org>:
> 
> > If I bundle the commons-vfs2 (2.1-SNAPSHOT/2.0) with the rar I get
> > then exception:
> > FileSystemException: Could not load VFS configuration from
> > "jar:file:/home/helge/Skrivebord/jca-parent/acme-war/target/apache-tomee/apps/acme-ra-1.0-SNAPSHOT/commons-vfs2-2.1-SNAPSHOT.jar!/org/apache/commons/vfs2/impl/providers.xml"
> 
> Is this JAR and with the resource existing or not?
> 
> > If I add vfs2-commons to tomee/lib and provided in my rar, then its
> > working OK.
> > 
> > Is this how it's supposed to work?
> 
> The default configuration mechanism resolves "providers.xml" via the
> classloader of the StandardFileSystemManager class. It retrieves the
> URL for that resource and loads it.
> 
> You might want to overwrite the init() method or somple create the
> DefaultFileSystemManager and configure it yourself.
> 
> (I am not entirely sure why it does not work in your scenario).
> 
> Gruss
> Bernd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 



Re: [vfs] FileSystemException: Could not load VFS configuration

Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
Am Wed, 25 Mar 2015 17:48:03 +0100
schrieb Helge Waastad <he...@waastad.org>:

> If I bundle the commons-vfs2 (2.1-SNAPSHOT/2.0) with the rar I get
> then exception:
> FileSystemException: Could not load VFS configuration from
> "jar:file:/home/helge/Skrivebord/jca-parent/acme-war/target/apache-tomee/apps/acme-ra-1.0-SNAPSHOT/commons-vfs2-2.1-SNAPSHOT.jar!/org/apache/commons/vfs2/impl/providers.xml"

Is this JAR and with the resource existing or not?

> If I add vfs2-commons to tomee/lib and provided in my rar, then its
> working OK.
> 
> Is this how it's supposed to work?

The default configuration mechanism resolves "providers.xml" via the
classloader of the StandardFileSystemManager class. It retrieves the
URL for that resource and loads it.

You might want to overwrite the init() method or somple create the
DefaultFileSystemManager and configure it yourself.

(I am not entirely sure why it does not work in your scenario).

Gruss
Bernd

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