[vfs] FileSystemException: Could not load VFS configuration

2015-03-25 Thread Helge Waastad
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

2015-03-25 Thread 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-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org