Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-228

Ant regression with ClassNotFoundException for DefaultLocalFileProvider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.0
    • None
    • None
    • 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

    Description

      The latest version from trunk fails to work with Apache Ant resulting in this error:
      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".

      which was caused by
      java.lang.ClassNotFoundException: org.apache.commons.vfs.provider.local.DefaultLocalFileProvider

      The cause seems to be a class loader issued introduced in rev 537717.

      Reverting that change:
      cd core
      svn diff -c r537717 src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java | patch -R
      mvn clean install
      [copy commons-vfs-2.0-SNAPSHOT to my test's lib dir]
      ant -f test.xml test

      Makes my example ant file work again (worked with the 1.0 release).
      The 537717 revision was intended to fix
      VFS-136: Don't force-set the classloader - Thanks to Adam Heath for the patch

      So it might be a bit controversial to reverse that change.
      Attaching patch fixing the issue and my example ant file.

      Attachments

        1. patch
          2 kB
          Per Hermansson
        2. test.xml
          0.4 kB
          Per Hermansson
        3. vfs-task.diff
          0.6 kB
          Olivier Samyn

        Activity

          People

            Unassigned Unassigned
            perher Per Hermansson
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: