8 Replies Latest reply on Apr 11, 2005 11:39 AM by Petr Nejedly

    problems after changing DefaultPartition

    markwise Newbie

       

      "Mark Wise" wrote:
      Hy,
      After changing the partition name "DefaultPartition" to "MyPartition" in the cluster-service.xml and in the jboss-service.xml of an MBean, the server comes up with a null pointer exception when started. Leaving the name to "DefaultPartition" everything works well.
      here the dump:java.lang.NullPointerException
      at org.jboss.ha.jmx.HAServiceMBeanSupport.registerRPCHandler(HAServiceMBeanSupport.java:173)
      at org.jboss.ha.jmx.HAServiceMBeanSupport.startService(HAServiceMBeanSupport.java:142)
      at org.jboss.varia.scheduler.AbstractScheduleProvider.startService(AbstractScheduleProvider.java:236)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy39.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at org.jboss.system.ServiceController.start(ServiceController.java:411)
      at org.jboss.system.ServiceController.start(ServiceController.java:411)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy44.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy39.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy12.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy38.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:377)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.ha.framework.server.FarmMemberService.startService(FarmMemberService.java:157)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy14.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      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.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:395)
      at java.lang.Thread.run(Thread.java:536)
      17:16:07,516 WARN [ServiceController] Problem starting service sso:service=HASingleScheduleProvider

      What must be done to change the DefaultPartition name and to avoid the null Pointer exception?

      thanx for help


        • 1. Re: problems after changing DefaultPartition
          Guillaume Giraud Newbie

           

          "gg79" wrote:
          Hi all,

          I am also trying to change partition name and I can't find in the documentation how to do it.

          Is it enough to replace DefaultPartition by MyPartition every where in cluster-services.xml and jboss-service.xml as Mark just said ?

          Also, does anyone know what the steps to have more than one partition for one server are?

          Thanks for your help


          • 2. Re: problems after changing DefaultPartition
            Mike Finn Apprentice

             

            "mikefinn" wrote:
            I have been unable to get a seamless/no-login session failover either. I haven't had time to dig into it yet, but I suspect that somewhere, the session principal is not being serialized to the cluster.

            To change partition name, be aware that you will also need to add the appropriate tags to your ejb descriptor to tell the container which cluster partition to which it should be deployed. Otherwise, everything will be deployed to default partition.

            If you are adding a partition (disclaimer: I haven't done this yet), make sure you add a farm service for the '2nd' partition if you are using farming.

            Mike


            • 3. Re: problems after changing DefaultPartition
              Mike Finn Apprentice

               

              "mikefinn" wrote:
              Sorry - ignore the 1st paragraph in the response. I inadvertently answered the wrong post. I sure wish the text of the message to which we are replying showed on the reply page.


              • 4. Re: problems after changing DefaultPartition
                Yaron Rosenbaum Newbie

                 

                "yaronr" wrote:
                I have the exact same problem.
                Did anyone manage to solve this?


                • 5. Re: problems after changing DefaultPartition
                  vanita Newbie

                   

                  "vanita" wrote:
                  We need to change DefaultPartition" to "MyPartition" at all the places the cluster-service.xml and mention the same name in jboss.xml of the bean


                  • 6. Re: problems after changing DefaultPartition
                    Yaron Rosenbaum Newbie

                     

                    "yaronr" wrote:
                    Ok, I solved it (after reading another thread somewhere).

                    There's aparenly a bug in jboss_hahttpsession.sar.
                    It REQUIRES there to be a 'DefaultPartition'.

                    Sinly create two partitions: One called 'MyPartition' and one called 'DefaultPartition'. Register ALL your stuff to the 'MyPartition'.

                    If you simply rename 'DefaultPartition' to 'MyPartition' everywhere, some services will not load (ha httpsession for ex).

                    Let's hope they fix the jboss_hahttpsession sometime soon, but this shuld generally work for most cases.

                    Hope this helps.


                    • 7. Re: problems after changing DefaultPartition
                      Jon Lido Newbie

                       

                      "yaronr" wrote:
                      Ok, I solved it (after reading another thread somewhere).

                      There's aparenly a bug in jboss_hahttpsession.sar.
                      It REQUIRES there to be a 'DefaultPartition'.

                      Hope this helps.


                      This does not appear to be correct, at least in version 3.2.3. The partition name for jboss-hahttpsession.sar is defined in jbossha-httpsession.sar/ClusteredHttpSessionEB.jar/META-INF/jboss.xml.

                      Replace DefaultPartition to MyPartition in that file and I bet your errors go away. It works for me.


                      • 8. Re: problems after changing DefaultPartition
                        Petr Nejedly Newbie

                        I had to add this code into deploy-hasingleton-service.xml file (JBoss 3.2.5):

                        <mbean code="org.jboss.ha.singleton.HASingletonController"
                         name="jboss.ha:service=HASingletonDeployer">
                         <depends>jboss:service=MyPartition</depends>
                         <depends optional-attribute-name="TargetName">jboss.system:service=MainDeployer</depends>
                         <attribute name="TargetStartMethod">deploy</attribute>
                         <attribute name="TargetStartMethodArgument">${jboss.server.home.url}/deploy-hasingleton</attribute>
                         <attribute name="TargetStopMethod">undeploy</attribute>
                         <attribute name="TargetStopMethodArgument">${jboss.server.home.url}/deploy-hasingleton</attribute>
                         <attribute name="PartitionName">MyPartition</attribute> </mbean>