7 Replies Latest reply on Mar 9, 2005 1:47 PM by phoenixsilver

    Symlinks in the deploy directory?

    david_xplana

      Hey everyone,

      I'm quite unfamiliar with JBoss, and I have a quick question. Is is possible to use symlinks in the deploy directory under linux? I would like users to be able to keep all their packages under their home directories and simply create symlinks from the deploy directory.

      When I try to create a symlink to a war file (test.war -> /home/user/test.war), the following appears in the log file:

      DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: ... file:/usr/jboss/jboss-4.0.0/server/default/deploy/test.war could not be opened, does it exist?


      Is it a permissions problem, or simply not possible? Any help on this is greatly appreciated.

      Dave.



        • 1. Re: Symlinks in the deploy directory?
          starksm64

          It looks ok to me. I created a link to a /tmp/test.war and that deploys fine:

          [starksm@lamia deploy]$ ls -l test.war
          lrwxrwxrwx 1 starksm starksm 13 Dec 2 11:55 test.war -> /tmp/test.war/
          
          ...
          11:56:27,186 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=file:/cvs/Releases/jboss-4.0.0/server/symlink/deploy/test.war/
          


          I was able to access this using http://localhost:8080/test/. I did see this suprious warning, but it does not affect the web app behavior so I would say its just a permission issue.

          11:58:12,222 WARN [JARDeployer] Failed to add deployable jar: file:/cvs/Releases/jboss-4.0.0/server/symlink/tmp/deploy/tmp51228index.html
          java.util.zip.ZipException: error in opening zip file
           at java.util.zip.ZipFile.open(Native Method)
           at java.util.zip.ZipFile.<init>(ZipFile.java:112)
           at java.util.jar.JarFile.<init>(JarFile.java:127)
           at java.util.jar.JarFile.<init>(JarFile.java:65)
           at org.jboss.deployment.SubDeployerSupport.processNestedDeployments(SubDeployerSupport.java:245)
           at org.jboss.deployment.SubDeployerSupport.init(SubDeployerSupport.java:143)
           at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
           at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          ...
          



          • 2. Re: Symlinks in the deploy directory?
            david_xplana

            Thanks a lot Scott. I'm ashamed, all the permissions on the home directories were set to 700. Wow.

            • 3. spurious error
              wiley173

              So this error should just be ignored, is there a way to get rid of it ?

              I edited the jboss-service.xml instead of symlinks...

               <attribute name="URLs">
               deploy/,
               file:/home/wiley173/
               </attribute>
              


              my hellowWorld.war seems to work fine but this error ???

              13:12:32,386 WARN [JARDeployer] Failed to add deployable jar: file:/home/wiley173/jboss-3.2.6/server/default/tmp/deploy/tmp62289jboss-3.2.6.tar.gz
              java.util.zip.ZipException: error in opening zip file
               at java.util.zip.ZipFile.open(Native Method)
               at java.util.zip.ZipFile.<init>(ZipFile.java:112)
               at java.util.jar.JarFile.<init>(JarFile.java:127)
               at java.util.jar.JarFile.<init>(JarFile.java:65)
               at org.jboss.deployment.SubDeployerSupport.processNestedDeployments(SubDeployerSupport.java:241)
               at org.jboss.deployment.SubDeployerSupport.init(SubDeployerSupport.java:139)
               at org.jboss.deployment.MainDeployer.init(MainDeployer.java:696)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:631)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
               at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
               at $Proxy8.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
               at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
               at
              
              ...
              
              


              Is this just an error with how I set up my .war file?



              • 4. Re: Symlinks in the deploy directory?
                wiley173

                I moved the .war outside of my "jboss" user directory wiley173 and it went away ...

                • 5. Re: Symlinks in the deploy directory?
                  starksm64

                  Your URLs list is poorly choosen as it includes a directory which includes the entire server distribution. This will recursively scan all directories under /home/wiley173/ looking for deployable content.

                  • 6. Re: Symlinks in the deploy directory?
                    wiley173

                    Yeah, I found that one out after starting jboss and watching the output for an hour

                    -thanks happy christmas !

                    • 7. Re: Symlinks in the deploy directory?
                      phoenixsilver

                      How do you specify this on a Windows machine.

                      This is what I have, and I'm getting the same zip errors


                      deploy/,file:/Projects/UFA/Pace_Phase_II/Development/eclipse/workspace/Self-Service/http.war/


                      Location of my Jboss installation
                      D:\Projects\UFA\Pace_Phase_II\Development\jboss-4.0.1\