It looks like your classpath doesn't include all of the vfs libraries. You might want to check to see that you have all dependent libraries. The VFS project page should give you a list of dependencies.
Hope this helps, Mark On Wed, Dec 10, 2008 at 4:07 AM, Per Hermansson <[EMAIL PROTECTED] > wrote: > Hi > I'm having trouble using recent versions of Commons VFS. > Current trunk gives the following error: > > org.apache.commons.vfs.FileSystemException: Could not load VFS > configuration from > "jar:file:/media/Fort/per/program/backup/lib/commons-vfs-2.0-SNAPSHOT.jar!/org/apache/commons/vfs/impl/providers.xml". > at > org.apache.commons.vfs.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:199) > at > org.apache.commons.vfs.impl.StandardFileSystemManager.init(StandardFileSystemManager.java:126) > at org.apache.commons.vfs.tasks.VfsTask.resolveFile(VfsTask.java:53) > ... > Caused by: org.apache.commons.vfs.FileSystemException: Could not create > file provider of class > "org.apache.commons.vfs.provider.local.DefaultLocalFileProvider". > at > org.apache.commons.vfs.impl.StandardFileSystemManager.createInstance(StandardFileSystemManager.java:477) > at > org.apache.commons.vfs.impl.StandardFileSystemManager.addProvider(StandardFileSystemManager.java:358) > ... > Caused by: java.lang.ClassNotFoundException: > org.apache.commons.vfs.provider.local.DefaultLocalFileProvider > at java.net.URLClassLoader$1.run(URLClassLoader.java:217) > at java.security.AccessController.doPrivileged(Native Method) > > while the latest release (commons-vfs-1.0) works without error. > Here is the ant script I've tested with > > <project xmlns:vfs="antlib:org.apache.commons.vfs.tasks"> > <taskdef uri="antlib:org.apache.commons.vfs.tasks" > resource="org/apache/commons/vfs/tasks/antlib.xml"> > <classpath> > <pathelement location="lib/commons-vfs-2.0-SNAPSHOT.jar"/> > <pathelement location="lib/commons-logging-1.1.1.jar"/> > </classpath> > </taskdef> > > <target name="test"> > <vfs:copy src="lib" destdir="lib2" /> > </target> > </project> > > Does anyone know a solution to this? > My environment: > > > java version "1.6.0_0" > IcedTea6 1.3.1 (6b12-0ubuntu6) Runtime Environment (build 1.6.0_0-b12) > OpenJDK Client VM (build 1.6.0_0-b12, mixed mode, sharing) > > Apache Ant version 1.7.1 compiled on October 3 2008 > > Thanks > /Per > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Mark Fortner blog: http://feeds.feedburner.com/jroller/ideafactory
