14 Replies Latest reply on Feb 16, 2009 6:35 AM by Ales Justin

    deploy sar before datasource

    abhinav goel Newbie

      hi
      i have 2 sars and one -ds.xml in deploy folder. now jboss5 deploys sars before binding database from -ds.xml which is used by sars. how can i bind datasource before deploying sars. i tried to put sars in default/deploy/last.deploy but it dint work. it gives me instanceAlreadyExist exception.
      kindly help...

        • 1. Re: deploy sar before datasource
          abhinav goel Newbie

          also there is a war inside that sar which has filters and servlets configured. there is nothing in jboss-service.xml where i can add 'depends' to load datasource first.
          thanks

          • 2. Re: deploy sar before datasource
            abhinav goel Newbie

            how can i get support for prefix deployment of sars? like it used to be in 4.0.2 in default/conf/jboss-service.xml :
            org.jboss.deployment.scanner.PrefixDeploymentSorter

            • 3. Re: deploy sar before datasource
              Ales Justin Master

              See LegacyDeploymentContextComparator in deployers.xml.

              • 4. Re: deploy sar before datasource
                abhinav goel Newbie

                hi alesj
                u want this piece of code:

                static
                 {
                 legacyOrder = new HashMap<String, Integer>();
                 legacyOrder.put(".deployer", 50);
                 legacyOrder.put("-deployer.xml", 50);
                 legacyOrder.put(".aop", 100);
                 legacyOrder.put("-aop.xml", 100);
                 legacyOrder.put(".sar", 150);
                 legacyOrder.put("-service.xml", 150);
                 legacyOrder.put(".beans", 200);
                 legacyOrder.put("-jboss-beans.xml", 200);
                 legacyOrder.put(".rar", 250);
                 legacyOrder.put("-ds.xml", 300);
                 legacyOrder.put(".har", 350);
                 legacyOrder.put(".jar", 400);
                 legacyOrder.put(".ejb3", 400);
                 legacyOrder.put(".par", 400);
                 legacyOrder.put(".war", 500);
                 legacyOrder.put(".wsr", 600);
                 legacyOrder.put(".ear", 650);
                 legacyOrder.put(".jar", 700);
                 legacyOrder.put(".zip", 750);
                 legacyOrder.put(".bsh", 800);
                 legacyOrder.put(".last", 900);
                 }


                well thats wat m asking, how can i change it? deploy.last(by mistake i wrote last.deploy in first post) gives me exception as i hav mentioned

                • 5. Re: deploy sar before datasource
                  jaikiran pai Master

                   

                  how can i bind datasource before deploying sars. i tried to put sars in default/deploy/last.deploy but it dint work. it gives me instanceAlreadyExist exception.


                  Please post the entire exception stack trace and also the relevant part of console logs.


                  • 6. Re: deploy sar before datasource
                    abhinav goel Newbie

                     

                    13:52:50,403 INFO [NativeServerConfig] 3.0.4.SP1
                    13:52:52,934 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/01portal-common.jar
                    javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/01portal-common.jar",type=SubDeployment already registered.
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
                    at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                    at org.jboss.Main.boot(Main.java:209)
                    at org.jboss.Main$1.run(Main.java:547)
                    at java.lang.Thread.run(Thread.java:619)
                    13:52:52,934 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/50portal-common.sar
                    javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/50portal-common.sar",type=SubDeployment already registered.
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
                    at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                    at org.jboss.Main.boot(Main.java:209)
                    at org.jboss.Main$1.run(Main.java:547)
                    at java.lang.Thread.run(Thread.java:619)
                    13:52:52,934 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/portal-common.war
                    javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/D:/jboss5/server/default/deploy/deploy.last/11portal-common.sar/portal-common.war",type=SubDeployment already registered.
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
                    at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                    at org.jboss.Main.boot(Main.java:209)
                    at org.jboss.Main$1.run(Main.java:547)
                    at java.lang.Thread.run(Thread.java:619)
                    13:52:52,950 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/D:/jboss5/server/default/deploy/deploy.last/12uPortal.sar/uPortal.jar
                    javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/D:/jboss5/server/default/deploy/deploy.last/12uPortal.sar/uPortal.jar",type=SubDeployment already registered.
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
                    at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                    at org.jboss.Main.boot(Main.java:209)
                    at org.jboss.Main$1.run(Main.java:547)
                    at java.lang.Thread.run(Thread.java:619)
                    13:52:52,950 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/D:/jboss5/server/default/deploy/deploy.last/12uPortal.sar/uPortal.war
                    javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/D:/jboss5/server/default/deploy/deploy.last/12uPortal.sar/uPortal.war",type=SubDeployment already registered.
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
                    at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
                    at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
                    at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:597)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
                    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                    at org.jboss.Main.boot(Main.java:209)
                    at org.jboss.Main$1.run(Main.java:547)
                    at java.lang.Thread.run(Thread.java:619)


                    • 7. Re: deploy sar before datasource
                      jaikiran pai Master

                      All those are WARN messages. Ignore them for now. They are related to this http://www.jboss.org/index.html?module=bb&op=viewtopic&t=150319

                      • 8. Re: deploy sar before datasource
                        abhinav goel Newbie

                        how can i get rid of this??? thr is no other option to change deploy sequence? also if put 3 sars in deploy.last folder, wat sequence does it follow to deploy them. i mena does it goes alphabetically or by prefix numbers?

                        • 9. Re: deploy sar before datasource
                          Ales Justin Master

                           

                          "jaikiran" wrote:
                          All those are WARN messages. Ignore them for now. They are related to this http://www.jboss.org/index.html?module=bb&op=viewtopic&t=150319

                          This is fixed in Deployers trunk.
                          It will be a part of next release.

                          • 10. Re: deploy sar before datasource
                            Ales Justin Master

                             

                            "abhinav.ind" wrote:

                            well thats wat m asking, how can i change it? deploy.last(by mistake i wrote last.deploy in first post) gives me exception as i hav mentioned

                            I think I left some hooks in there, so you can alter this behavior/order:
                            - http://anonsvn.jboss.org/repos/jbossas/trunk/system/src/main/org/jboss/system/deployers/LegacyDeploymentContextComparator.java

                            • 11. Re: deploy sar before datasource
                              Ales Justin Master

                               

                              "abhinav.ind" wrote:
                              i mena does it goes alphabetically or by prefix numbers?

                              In this order:
                              - suffix number
                              - context info order
                              - alphabetically

                              But you can easily write your own comparator. ;-)


                              • 13. Re: deploy sar before datasource
                                abhinav goel Newbie

                                ah, just can u tell me one thing. when is this comparator invoked. if i write my own where shud i keep it so that its available to jboss while deploying my sars??

                                • 14. Re: deploy sar before datasource
                                  Ales Justin Master

                                   

                                  "abhinav.ind" wrote:
                                  when is this comparator invoked.

                                  This orders contents of:
                                  * deploy/ directory
                                  * .ear sub-deployments

                                  "abhinav.ind" wrote:
                                  if i write my own where shud i keep it so that its available to jboss while deploying my sars??

                                  In JBOSS_HOME/lib, since it's used at bootstrap.