7 Replies Latest reply on Feb 13, 2009 3:15 PM by Peter Johnson

    Need to change /deployers directory?

    Stan Silvert Master

      I'm using Cargo to start AS5. Cargo creates a new server configuration based off of default, then starts the server. My JSFUnit deployer is copied to the cargoconfig/deployers directory before the server is started. However, AS5 is still looking at default/deployers instead of cargoconfig/deployers. So my deployer isn't picked up. Does Cargo need to do something different or is there a way I can tell AS5 to look in a different location for deployers?

      BTW, boot.log looks like this:
      11:28:40,240 INFO [ServerImpl] Starting JBoss (Microcontainer)...
      11:28:40,241 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)
      11:28:40,241 DEBUG [ServerImpl] Using config: org.jboss.bootstrap.BaseServerConfig@91cee
      11:28:40,241 DEBUG [ServerImpl] Server type: class org.jboss.bootstrap.microcontainer.ServerImpl
      11:28:40,242 DEBUG [ServerImpl] Server loaded through: org.jboss.system.NoAnnotationURLClassLoader
      11:28:40,242 INFO [ServerImpl] Bootstrap URL: null
      11:28:40,242 INFO [ServerImpl] Home Dir: C:\projects\jbosslabs\containers\jboss-5.0.0.GA
      11:28:40,242 INFO [ServerImpl] Home URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/
      11:28:40,242 INFO [ServerImpl] Library URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/lib/
      11:28:40,243 INFO [ServerImpl] Patch URL: null
      11:28:40,243 INFO [ServerImpl] Common Base URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/common/
      11:28:40,243 INFO [ServerImpl] Common Library URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/common/lib/
      11:28:40,243 INFO [ServerImpl] Server Name: default
      11:28:40,243 INFO [ServerImpl] Server Base Dir: C:\projects\jbosslabs\containers\jboss-5.0.0.GA\server
      11:28:40,243 INFO [ServerImpl] Server Base URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/server/
      11:28:40,244 INFO [ServerImpl] Server Config URL: file:/c:/projects/jbosslabs/jsfunit/jboss-jsfunit-microdeployer/target/cargoconfig/conf/
      11:28:40,245 INFO [ServerImpl] Server Home Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig
      11:28:40,245 INFO [ServerImpl] Server Home URL: file:/c:/projects/jbosslabs/jsfunit/jboss-jsfunit-microdeployer/target/cargoconfig/
      11:28:40,246 INFO [ServerImpl] Server Data Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig\data
      11:28:40,246 INFO [ServerImpl] Server Library URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/server/default/lib/
      11:28:40,246 INFO [ServerImpl] Server Log Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig\log
      11:28:40,246 INFO [ServerImpl] Server Native Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig\tmp\native
      11:28:40,246 INFO [ServerImpl] Server Temp Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig\tmp
      11:28:40,246 INFO [ServerImpl] Server Temp Deploy Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig\tmp\deploy
      11:28:40,250 DEBUG [ServerImpl] Shutdown hook added Thread[JBoss Shutdown Hook,5,jboss]
      11:28:40,262 DEBUG [KernelFactory] Starting JBoss Kernel construction...

      Stan

        • 1. Re: Need to change /deployers directory?
          jaikiran pai Master

           

          11:28:40,242 INFO [ServerImpl] Home Dir: C:\projects\jbosslabs\containers\jboss-5.0.0.GA

          11:28:40,245 INFO [ServerImpl] Server Home Dir: C:\projects\jbosslabs\jsfunit\jboss-jsfunit-microdeployer\target\cargoconfig
          ...
          11:28:40,246 INFO [ServerImpl] Server Library URL: file:/C:/projects/jbosslabs/containers/jboss-5.0.0.GA/server/default/lib/


          This seems odd. The JBoss home dir points to C:\projects\jbosslabs\containers\jboss-5.0.0.GA whereas the server configuration home points to C:\projects\jbosslabs\jsfunit.....

          Does this mean that the cargo plugin creates a server configuration outside of the JBoss home dir? And how does it start the server? Does it pass any -c parameters and also does it pass any of the following system properties http://www.jboss.org/community/docs/DOC-10730

          This seems like a issue in the properties that are being passed to the server while starting, since manually creating a copy of "default" configuration and starting it with

          ./run.sh -c mycopy


          works fine (the deployers are picked from the mycopy/deployers).


          • 2. Re: Need to change /deployers directory?
            Emanuel Muckenhuber Master

            Hmm profileservice also needs the system properties to be set correctly, as jboss.home.dir is used in the bootstrap/profile-repository.xml.
            There is also some ongoing work in the jboss bootstrap project to provide better support for starting AS, as all the properties setup is currently done in Main.

            • 3. Re: Need to change /deployers directory?
              Stan Silvert Master

               

              "jaikiran" wrote:


              Does this mean that the cargo plugin creates a server configuration outside of the JBoss home dir? And how does it start the server? Does it pass any -c parameters and also does it pass any of the following system properties http://www.jboss.org/community/docs/DOC-10730


              Yes, the Cargo plugin creates a server config outside of JBoss home. This has worked fine for JBoss 3 & 4. I've asked Matt Wringe to join the discussion since he maintains the plugin. He should be able to tell you exactly what Cargo is doing.

              Stan

              • 4. Re: Need to change /deployers directory?
                Matt Wringe Master

                The issue here is most likely Cargo and how it is setting the deployers directory.

                For testing purposes, Cargo can take an unzipped AS install and use what is in this install to create its own sandbox testing environment in a temporarily directory. Since it doesn't change anything in the unzipped AS install directory it can be used for multiple tests.

                It doesn't create a full copy of the install, but only copies over what it needs. For example, instead of copying over all the jars it will just reference them from the original unzipped AS. By not copying everything over it makes it quicker to setup a testing sandbox (although with AS the sandbox tends to be on the larger size, for Tomcat and Jetty the sandbox is a lot smaller compared to the original).

                Because of all of this, Cargo has its own special configuration files (which it also uses to change server settings in the sandbox) . The problem with the deployers directory not being properly found is probably an issue with Cargo's configuration files. I can look into it to see what the problem is.

                • 5. Re: Need to change /deployers directory?
                  Matt Wringe Master

                   


                  My JSFUnit deployer is copied to the cargoconfig/deployers directory before the server is started. However, AS5 is still looking at default/deployers instead of cargoconfig/deployers


                  Ok, re-reading the post I release this is probably just a configuration problem, you just need to tell Cargo to use the cargoconfig server instead of the default one.

                  You just need to set the cargo.jboss.configuration to cargoconfig, it should have the same effect as -c when you normally start Cargo.

                   <configuration>
                   <properties>
                   <cargo.jboss.configuration>cargoconfig</cargo.jboss.configuration>
                   </properties>
                   </configuration>
                  


                  [note: that's for the nested 'configuration' tag]

                  • 6. Re: Need to change /deployers directory?
                    Matt Wringe Master

                    Is there an option in any of the jboss configuration files to specify the location of the deployers directory? I can't seem to find any reference to it.

                    • 7. Re: Need to change /deployers directory?
                      Peter Johnson Master

                      The default configuration uses the profile repository. The default profile repository is the file repository which has built into it the locations of various directories, including the deployers directory - there is no way to change it (you can change the location of the 'deploy' directory in conf/bootstrap/profile-repository.xml)

                      If you want to use the non-repository bootstrap, you can specify the deployers directory in conf/bootstrap/profile.xml. To use the non-repository bootstrap, you can swap the names of the conf/bootstrap.xml and conf/bootstrap-norepo.xml file (it uses conf/boostrap by default), or you can add the following option to the run command:

                      -Djboss.serv.config.url=xxx

                      where xxx is the full URL to the desired file.