11 Replies Latest reply on Jan 5, 2010 12:27 PM by matt.drees

    bug in VFS preventing testsuiting from running on OS X

    matt.drees

      I've spent some time debugging a problem trying to run the jboss-embedded testsuite, and thought I'd post the outcome here in case anyone else comes across the same problem.

       


      The issue is that the testsuite (rightfully) puts temp deployables (e.g. slsb.jar) into the temp directory.  Under OS X, this directory contains one or more '+' symbols.  Unfortunately, the ZipEntryContext from VFS does not appear to correctly handle paths with plus symbols (it uses URLDecoder.decode(), which I believe is broken).  I've filed a jira here: https://jira.jboss.org/jira/browse/JBVFS-129.

       

      The stacktrace looks something like:

       


      {noformat}

      org.jboss.embedded.api.DeploymentException: org.jboss.deployers.spi.DeploymentException: Error determining structure: slsb.jar
              ... [snip]
      Caused by: org.jboss.deployers.spi.DeploymentException: Error determining structure: slsb.jar
              ... [snip]
           ... 31 more
      Caused by: java.lang.RuntimeException: Failed to initialize ZipWrapper: /var/folders/JG/JGDYgcyPGF8WRpvalJeL0k+++TI/-Tmp-/slsb.jar
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getZipSource(ZipEntryContext.java:286)
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:637)
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:783)
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:827)
           at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195)
           at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690)
           at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169)
           at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
           at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:492)
           at org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure.determineStructure(DeclaredStructure.java:64)
           ... 40 more
      Caused by: java.io.FileNotFoundException: /var/folders/JG (No such file or directory)
           at java.io.FileInputStream.open(Native Method)
           at java.io.FileInputStream.<init>(FileInputStream.java:106)
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.createZipSource(ZipEntryContext.java:361)
           at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getZipSource(ZipEntryContext.java:282)
           ... 49 more

      {noformat}

       

      A workaround is to specify a different temp directory on startup (use -Djava.io.tmpdir=/some/path/without/pluses).