6 Replies Latest reply on Mar 4, 2010 10:28 AM by Alessio Soldano

    Trivial vfs-3.0.x manifest access fails

    Thomas Diesler Master

      When trying to access the manifest from a jar, I get

       

      Caused by: java.io.FileNotFoundException: /home/tdiesler/svn/jboss-osgi/trunk/testsuite/example/target/test-libs/example-simple.jar/META-INF/MANIFEST.MF (Not a directory)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:106)
          at org.jboss.vfs.spi.RealFileSystem.openInputStream(RealFileSystem.java:67)
          at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:225)
          at org.jboss.osgi.vfs30.VirtualFileAdaptor30.openStream(VirtualFileAdaptor30.java:106)
          at org.jboss.osgi.vfs.VFSUtils.getManifest(VFSUtils.java:49)
          at org.jboss.osgi.spi.util.BundleInfo.<init>(BundleInfo.java:109)
      
      

       

      Essentially I do

       

      VirtualFile root = VFS.getChild(url);
      VirtualFile manifest = root.getChild(JarFile.MANIFEST_NAME);
      InputStream stream = manifest.openStream();
      

       

      In vfs21 I do

       

      VirtualFile root = VFS.getRoot(url);
      VirtualFile manifest = root.getChild(JarFile.MANIFEST_NAME);
      InputStream stream = manifest.openStream();
      

       

      which works.