11 Replies Latest reply on Nov 10, 2008 11:41 AM by Peter Johnson

    Is it possible to configure deployment directory location?

    jonathanztaub Newbie

      I'm working with the default deployment directory.
      It is possible, for example, to have an exploded .war directory at some place other than the "default" directory? For example, have it on "C:\\my_web_app"?

      If so, what are the configuration changes I need to make?

        • 1. Re: Is it possible to configure deployment directory locatio
          jonathanztaub Newbie

          I was able to find an elegant hack to this.
          My workstation is Windows XP.
          There is a command line tool called "fsutil" which you can use to create symlinks like between files. However, it doesn't support creating such links for directories. There seem to be some hidden/undocumented OS API call which creates a "junction". I downloaded a junction command line program from Windows Technet website and easily mapped a "mywebapp.war" directory to my output directory.

          However, I would still like to know whether the is an option to configure this at the JBoss level.

          • 2. Re: Is it possible to configure deployment directory locatio
            jaikiran pai Master

             

            "jonathanztaub" wrote:
            I'm working with the default deployment directory.
            It is possible, for example, to have an exploded .war directory at some place other than the "default" directory? For example, have it on "C:\\my_web_app"?

            If so, what are the configuration changes I need to make?


            Yes, you can place the war in a folder of your choice. The %JBOSS_HOME%\server\default\conf has a jboss-service.xml file. Look at the URLs attribute at the end of that file. If you have a application placed inside the C:\MyJBossApps folder, then the URLs attribute should look like:
            <attribute name="URLs">
             deploy/,file:///C:/MyJBossApps/
            </attribute>


            The server will then scan for all the applications under C:\MyJBossApps folder, for deployment

            • 3. Re: Is it possible to configure deployment directory locatio
              jonathanztaub Newbie

              Thanks!

              This is precisely what I was looking for.
              Currently my priorities shifted elsewhere, but I'll sure give it a try once I have some more downtime. This is by far better than resorting to symlinks like solution.

              • 4. Re: Is it possible to configure deployment directory locatio
                richard mike Newbie

                Hi,

                First, sorry for my english i'm french...

                So, i'm a beginner with JBoss and i try to deploy an existing web application in a different directory location but i don't know how to do this, because the attribute name=URLs has no effect when Jboss starts...?

                Can you help me please? i'm working with JBoss 5 but i don't know how to configure it to deploy external and exploded web app??

                thanks

                • 5. Re: Is it possible to configure deployment directory locatio
                  Peter Johnson Master

                  To declare an external directory For JBoss 5.0.0.CR2, you need to edit the server/xxx/conf/profile.xml file, the URIList property of the VFSDeploymentScanner bean.

                  • 6. Re: Is it possible to configure deployment directory locatio
                    richard mike Newbie

                    Thanks for your reply PeterJ,
                    but now i have :

                    19:01:44,834 ERROR [AbstractKernelController] Error installing to Configured: name=VFSDeploymentScanner state=Instantiated
                    java.lang.RuntimeException: Error configuring property: URIList for VFSDeploymentScanner
                     at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:114)
                     at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:87)
                     at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:44)
                     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                     at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:331)
                     at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:309)
                     at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
                     at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
                     at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
                     at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
                     at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:115)
                     at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:398)
                     at org.jboss.Main.boot(Main.java:209)
                     at org.jboss.Main$1.run(Main.java:544)
                     at java.lang.Thread.run(Unknown Source)
                    Caused by: java.io.IOException: No context factory for C:/DEV_JAVA/eclipse/workspace-150/Framework-IHM/webapp/
                     at org.jboss.virtual.VFS.getVFS(VFS.java:88)
                     at org.jboss.system.server.profileservice.VFSScanner.getVFforURI(VFSScanner.java:582)
                     at org.jboss.system.server.profileservice.VFSScanner.addURI(VFSScanner.java:280)
                     at org.jboss.system.server.profileservice.VFSScanner.setURIList(VFSScanner.java:179)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                     at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                     at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
                     at org.jboss.beans.info.plugins.BeanInfoUtil.set(BeanInfoUtil.java:177)
                     at org.jboss.beans.info.plugins.AbstractBeanInfo.setProperty(AbstractBeanInfo.java:289)
                     at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:89)
                     at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                     at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:109)
                     ... 25 more
                    Failed to boot JBoss:
                    java.lang.IllegalStateException: Incompletely deployed:


                    any idea?

                    thanks

                    • 7. Re: Is it possible to configure deployment directory locatio
                      Peter Johnson Master

                      What did you set URIList to? Did you read the documentation for that property in the 4.0.x or 4.2.x versions of JBossAS (it describes exactly what is allowed and how it is interpreted).

                      If you post the VFSDeploymentScanner bean from the profile.xml file, remember to enclose your XML text in UBBCode "code" tags - you can do this by selecting the XML text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

                      • 8. Re: Is it possible to configure deployment directory locatio
                        Paul Rooney Newbie

                        I'm also getting the same problem, I added a '/tmp/' directory and got the stack trace below

                         <bean name="VFSDeploymentScanner" class="org.jboss.system.server.profileservice.VFSDeploymentScannerImpl">
                         <property name="profileService"><inject bean="ProfileService"/></property>
                         <property name="filterInstance"><inject bean="DeploymentFilter"/></property>
                         <property name="URIList">
                         <list elementClass="java.net.URI">
                         <!-- Standard hot deployment directory -->
                         <value>${jboss.server.home.url}deploy/</value>
                         <value>/tmp/</value>
                         </list>
                         </property>
                         </bean>
                        



                        10:21:50,343 INFO [ServerImpl] Starting JBoss (Microcontainer)...
                        10:21:50,343 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.CR2 (build: SVNTag=JBoss_5_0_0_CR2 date=200809171139)
                        10:21:50,343 INFO [ServerImpl] Home Dir: C:\Dev\Progs\jboss-5.0.0.CR2
                        10:21:50,343 INFO [ServerImpl] Home URL: file:/C:/Dev/Progs/jboss-5.0.0.CR2/
                        10:21:50,343 INFO [ServerImpl] Library URL: file:/C:/Dev/Progs/jboss-5.0.0.CR2/lib/
                        10:21:50,343 INFO [ServerImpl] Patch URL: null
                        10:21:50,343 INFO [ServerImpl] Server Name: default
                        10:21:50,343 INFO [ServerImpl] Server Home Dir: C:\Dev\Progs\jboss-5.0.0.CR2\server\default
                        10:21:50,343 INFO [ServerImpl] Server Home URL: file:/C:/Dev/Progs/jboss-5.0.0.CR2/server/default/
                        10:21:50,343 INFO [ServerImpl] Server Data Dir: C:\Dev\Progs\jboss-5.0.0.CR2\server\default\data
                        10:21:50,343 INFO [ServerImpl] Server Temp Dir: C:\Dev\Progs\jboss-5.0.0.CR2\server\default\tmp
                        10:21:50,343 INFO [ServerImpl] Server Config URL: file:/C:/Dev/Progs/jboss-5.0.0.CR2/server/default/conf/
                        10:21:50,343 INFO [ServerImpl] Server Library URL: file:/C:/Dev/Progs/jboss-5.0.0.CR2/server/default/lib/
                        10:21:50,343 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml
                        10:21:50,687 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/Dev/Progs/jboss-5.0.0.CR2/server/default/conf/bootstrap.xml
                        10:21:51,203 INFO [CopyMechanism] VFS temp dir: C:\Dev\Progs\jboss-5.0.0.CR2\server\default\tmp
                        10:21:51,203 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
                        10:21:51,843 INFO [ServerInfo] Java version: 1.6.0_10,Sun Microsystems Inc.
                        10:21:51,843 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 11.0-b15,Sun Microsystems Inc.
                        10:21:51,843 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                        10:21:51,859 INFO [JMXKernel] Legacy JMX core initialized
                        10:21:52,562 INFO [MetaDataAwareProfile] Using profile root:C:\Dev\Progs\jboss-5.0.0.CR2\server\default
                        10:21:52,609 ERROR [AbstractKernelController] Error installing to Configured: name=VFSDeploymentScanner state=Instantiated
                        java.lang.RuntimeException: Error configuring property: URIList for VFSDeploymentScanner
                         at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:114)
                         at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:87)
                         at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:44)
                         at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                         at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                         at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                         at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                         at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                         at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                         at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:331)
                         at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:309)
                         at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
                         at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
                         at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
                         at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
                         at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:115)
                         at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:398)
                         at org.jboss.Main.boot(Main.java:209)
                         at org.jboss.Main$1.run(Main.java:544)
                         at java.lang.Thread.run(Thread.java:619)
                        Caused by: java.lang.NullPointerException
                         at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
                         at org.jboss.virtual.spi.VFSContextFactoryLocator.getFactory(VFSContextFactoryLocator.java:187)
                         at org.jboss.virtual.VFS.getVFS(VFS.java:86)
                         at org.jboss.system.server.profileservice.VFSScanner.getVFforURI(VFSScanner.java:582)
                         at org.jboss.system.server.profileservice.VFSScanner.addURI(VFSScanner.java:280)
                         at org.jboss.system.server.profileservice.VFSScanner.setURIList(VFSScanner.java:179)
                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:597)
                         at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                         at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                         at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
                         at org.jboss.beans.info.plugins.BeanInfoUtil.set(BeanInfoUtil.java:177)
                         at org.jboss.beans.info.plugins.AbstractBeanInfo.setProperty(AbstractBeanInfo.java:289)
                         at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:89)
                         at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                         at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                         at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:109)
                         ... 25 more
                        Failed to boot JBoss:
                        java.lang.IllegalStateException: Incompletely deployed:
                        
                        *** DEPLOYMENTS IN ERROR: Name -> Error
                        VFSDeploymentScanner -> java.lang.RuntimeException: Error configuring property: URIList for VFSDeploymentScanner
                        
                         at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:290)
                         at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
                         at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:119)
                         at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:398)
                         at org.jboss.Main.boot(Main.java:209)
                         at org.jboss.Main$1.run(Main.java:544)
                         at java.lang.Thread.run(Thread.java:619)
                        
                        


                        • 9. Re: Is it possible to configure deployment directory locatio
                          Paul Rooney Newbie

                          found a hack/workaround

                          use a relative path instead. The one below corresponds to c:\mydeploy

                           <!-- Scan for applications -->
                           <bean name="VFSDeploymentScanner" class="org.jboss.system.server.profileservice.VFSDeploymentScannerImpl">
                           <property name="profileService"><inject bean="ProfileService"/></property>
                           <property name="filterInstance"><inject bean="DeploymentFilter"/></property>
                           <property name="URIList">
                           <list elementClass="java.net.URI">
                           <!-- Standard hot deployment directory -->
                           <value>${jboss.server.home.url}deploy/</value>
                           <value>${jboss.server.home.url}../../../../../mydeploy/</value>
                           </list>
                           </property>
                           </bean>


                          • 10. Re: Is it possible to configure deployment directory locatio
                            jaikiran pai Master

                            You don't have to specify a relative path. You can use the following absolute path and get it working:

                            <value>file:///c:/mydeploy/</value>


                            • 11. Re: Is it possible to configure deployment directory locatio
                              Peter Johnson Master

                              I was going to say that using /tmp as a deploy directory is probably a bad idea. Also, whatever directory you use, you must ensure that the account running jbossas has full access rights to that directory.