2 Replies Latest reply on Aug 12, 2008 1:48 PM by Kabir Khan

    VFS Memory Deserialization

    Kabir Khan Master

       

      "alesj" wrote:

      Why this limitation in VFS:MemoryContextFactory
       public VFSContext createRoot(URL url)
       {
       try
       {
       String rootName = url.getHost();
       MemoryContext ctx = registry.get(rootName);
       if (ctx == null)
       {
       String urlPath = url.getPath();
       if (urlPath != null && urlPath.length() > 0)
       throw new IllegalArgumentException("Root can not contain '/' - " + urlPath);
      

      This last exception.

      Can we get past/handle this?

      The issue is when I use this:
      - http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/vfs/VirtualFileSerializator.java
      It breaks, since it cannot be deserialized - due to that exception.

      We can continue on the forum. :-)

      The exception was just there to make sure that people don't try to create roots from URLs such as vfsmemory://root/with/path. What should be used is vfsmemory://root. Is the problem you are seeing that it tries to pass in the whole URL? If possible try breaking it up? If not then the exception can probably be removed