5 Replies Latest reply on Feb 19, 2006 1:10 PM by Scott Stark

    How to create multiple instances of jboss on same server ?

    prashant borse Newbie

      Hi Friends,
      i want the solutin from you great minds, i think i need to explain things in detail .

      Please look into this

      I want to create two instances of jboss on same host.

      I have created following directories in my JBOSS_HOME
      e.g. "web" or "business" servers in

      /jboss-4.0.0/server/web and
      /jboss-4.0.0/server/business


      i have cpoied all the content from default directory to my default (directory) server to instances "web and business".
      Also created the directory "binding" in my jboss_home (jboss-4.0.0)" and copied the " jboss-4.0.0\docs\examples\binding-manager\sample-bindings.xml . After that i have changed it's name to "bindings.xml"(as "jboss-4.0.0\binding\bindings.xml).

      And uncommented the tag in file "jboss-4.0.0\server\business\conf\jboss-service.xml" and made some changes as follows



      ports-02
      <attribute name="StoreURLfile:/c:/jboss-4.0.0/binding/bindings.xml

      org.jboss.services.binding.XMLServicesStoreFactory




      Now when i starts the servers as follows
      run -c web
      It starts Ok.
      But when i start business server i get the gollowing exception

      C:\jboss-4.0.0\bin>run -c business
      ===============================================================================
      .
      JBoss Bootstrap Environment
      .
      JBOSS_HOME: C:\jboss-4.0.0\bin\\..
      .
      JAVA: C:\j2sdk1.4.2_06\bin\java
      .
      JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
      .
      CLASSPATH: C:\j2sdk1.4.2_06\lib\tools.jar;C:\jboss-4.0.0\bin\\run.jar
      .
      ===============================================================================
      .
      15:35:25,583 INFO [Server] Starting JBoss (MX MicroKernel)...
      15:35:25,583 INFO [Server] Release ID: JBoss [Zion] 4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)
      15:35:25,598 INFO [Server] Home Dir: C:\jboss-4.0.0
      15:35:25,598 INFO [Server] Home URL: file:/C:/jboss-4.0.0/
      15:35:25,598 INFO [Server] Library URL: file:/C:/jboss-4.0.0/lib/
      15:35:25,614 INFO [Server] Patch URL: null
      15:35:25,614 INFO [Server] Server Name: business
      15:35:25,614 INFO [Server] Server Home Dir: C:\jboss-4.0.0\server\business
      15:35:25,630 INFO [Server] Server Home URL: file:/C:/jboss-4.0.0/server/business/
      15:35:25,630 INFO [Server] Server Data Dir: C:\jboss-4.0.0\server\business\data
      15:35:25,630 INFO [Server] Server Temp Dir: C:\jboss-4.0.0\server\business\tmp
      15:35:25,645 INFO [Server] Server Config URL: file:/C:/jboss-4.0.0/server/business/conf/
      15:35:25,645 INFO [Server] Server Library URL: file:/C:/jboss-4.0.0/server/business/lib/
      15:35:25,645 INFO [Server] Root Deployment Filename: jboss-service.xml
      15:35:25,661 INFO [Server] Starting General Purpose Architecture (GPA)...
      15:35:26,020 INFO [ServerInfo] Java version: 1.4.2_06,Sun Microsystems Inc.
      15:35:26,020 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_06-b03,Sun Microsystems Inc.
      15:35:26,036 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      15:35:26,364 INFO [Server] Core system initialized
      15:35:28,442 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.0.0/server/business/conf/jboss-service.xm
      l
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager; -
      nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBinding
      Manager)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
      at org.jboss.system.ServiceController.install(ServiceController.java:200)
      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:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:208)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:745)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
      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:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
      at org.jboss.Main.boot(Main.java:151)
      at org.jboss.Main$1.run(Main.java:405)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:463)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1183)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:269)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:327)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:125)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
      ... 36 more
      Failed to boot JBoss:
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager; -
      nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBinding
      Manager)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
      at org.jboss.system.ServiceController.install(ServiceController.java:200)
      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:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:208)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:745)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
      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:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
      at org.jboss.Main.boot(Main.java:151)
      at org.jboss.Main$1.run(Main.java:405)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:463)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1183)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:269)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:327)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:125)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
      ... 36 more
      15:35:28,942 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
      Shutting down
      15:35:28,958 INFO [Server] Shutdown complete
      Shutdown complete
      Halting VM
      Press any key to continue . . .

      Thanks in Advance
      Regards,
      Prashant.

        • 1. Re: How to create multiple instances of jboss on same server
          prashant borse Newbie

          Hi Again,
          In my last post the changes i have made in jboss-service.xml has not displayed . These are as follows

          (except sign ">" here i used "^" due to some posting problems)

          <mbean code="org.jboss.services.binding.ServiceBindingManager"
          name="jboss.system:service=ServiceBindingManager"^

          <attribute name="ServerName"^ ports-02</attribute^

          <attribute name="StoreURL ^ file:/c:/jboss-
          4.0.0/binding/bindings.xml</attribute^

          <attribute name="StoreFactoryClassName"^
          org.jboss.services.binding.XMLServicesStoreFactory
          </attribute^

          </mbean^


          Regards,
          Prashant.

          • 2. Re: How to create multiple instances of jboss on same server
            sanjuthomas Newbie

            To create multiple instance of JBoss all you need to do is copy the default directory and rename according to your wish and put in the <JBOSS_HOME>>/server directory. Then change the http and jnp ports. you can find your http and AJP port in
            <JBOSS_HOME>\server\xxxxx\deploy\jbossweb-tomcat55.sar\server.xml

            now change the RMI, JNP, WEB-Service, ServerBindPort and RMIObjectPort port in
            <JBoss_HOME>\server\xxxxx\conf\jboss-service.xml

            now change the uil2-service port in <JBoss_HOME>\server\xxxxx\deploy\jms\uil2-service.xml

            you are done.

            now you can start your both instances

            run.bat -c xxxx
            run.bat -c yyyy

            • 3. Re: How to create multiple instances of jboss on same server
              Jan Philipp Giel Newbie

              I need to install a second jboss because i need the pfd version of ejb3.
              When I start jboss I get the following Exception:

              No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager
              


              My mbean configuration in default/deploy/binding-service.xml looks like this:
               <mbean code="org.jboss.services.binding.ServiceBindingManager"
               name="jboss.system:service=ServiceBindingManager">
               <attribute name="ServerName">ports-01</attribute>
               <attribute name="StoreURL">file:../server/default/conf/sample-bindings.xml</attribute>
               <attribute name="StoreFactoryClassName">
               org.jboss.services.binding.XMLServicesStoreFactory
               </attribute>
               </mbean>
              


              Any Ideas? I'm trying to run jboss4.0.4rc1 on a machine where jboss4.0.3sp1 is already running

              • 4. Re: How to create multiple instances of jboss on same server
                Jan Philipp Giel Newbie

                maybe you should state somewhere in the documentation that the binding service is not available in all configurations, e.g. I don't have it when selecting "ejb3" in the installer.
                Copied bindingservice-plugin.jar from "all" config...

                • 5. Re: How to create multiple instances of jboss on same server
                  Scott Stark Master

                  The installer lists the services available in each profile.