2 Replies Latest reply on Jan 21, 2011 10:54 AM by Felipe Jaekel

    Problem with symbolic link

    Felipe Jaekel Newbie

      I'm trying to create a symbolic link inside my application at runtime.


      String realPath = getServletContext().getRealPath("/download");
      realPath += "/tmp";
      if(!FileUtils.isSymlink(new File(realPath)))
      {
           Runtime.getRuntime().exec("ln -s /tmp " + realPath);
      }



      After the symbolic link is created my application stops working and I get the following exception:




      java.lang.NullPointerException
           org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:155)
           org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:160)
           org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:160)
           org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:160)
           org.jboss.seam.deployment.URLScanner.scanDirectories(URLScanner.java:48)
           org.jboss.seam.deployment.WarRootDeploymentStrategy.scan(WarRootDeploymentStrategy.java:77)
           org.jboss.seam.deployment.ForwardingDeploymentStrategy.scan(ForwardingDeploymentStrategy.java:31)
           org.jboss.seam.deployment.TimestampCheckForwardingDeploymentStrategy.changedSince(TimestampCheckForwardingDeploymentStrategy.java:15)
           org.jboss.seam.init.Initialization.redeploy(Initialization.java:812)
           org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:45)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      




      Any ideas?


      Thanks,
      Felipe