2 Replies Latest reply on Nov 22, 2012 1:30 AM by niteshmehta

    Problem upgrading to JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 5.1

    niteshmehta
      I am trying to upgrade JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 4.1
      After changing jars and configuration files I see following exception
      
      
       java.lang.RuntimeException: No Attribute found with name: SecurityStore for jboss.messaging:service=ServerPeer, attributes: [JMSMinorVersion, Instance, DefaultRedeliveryDelay, MessageCounterSamplePeriod, ServerPeerID, SuckerConnectionRetryInterval, ClusterPullConnectionFactoryName, RecoverDeliveriesTimeout, JMSVersion, MessageCounters, JMSUserManager, FailoverCompleteTimeout, DefaultMessageCounterHistoryDayLimit, StrictTck, DefaultTopicJNDIContext, DefaultDLQ, DefaultMaxDeliveryAttempts, PostOffice, JMSMajorVersion, SecurityDomain, FailoverStartTimeout, SupportsFailover, DefaultPreserveOrdering, ProviderMajorVersion, DefaultExpiryQueue, SuckerPassword, MessageStatistics, ProviderVersion, DefaultQueueJNDIContext, Destinations, SuckerConnectionRetryTimes, JMSProviderName, EnableMessageCounters, ProviderMinorVersion, PersistenceManager, DefaultSecurityConfig]
        at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:142)
        at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:114)
        at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:58)
        at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
        at org.jboss.system.ServiceController.install(ServiceController.java:274)
        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:90)
        ... 34 more
      
      
      
      
      
      
      below is my serverPeer mbean conf
      
      <mbean code="org.jboss.jms.server.ServerPeer"
            name="jboss.messaging:service=ServerPeer"
            xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
      
      
      
      
            <!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
      
      
      
      
            <attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>
      
            <!-- The default JNDI context to use for queues when they are deployed without specifying one --> 
      
            <attribute name="DefaultQueueJNDIContext">/queue</attribute>
      
            <!-- The default JNDI context to use for topics when they are deployed without specifying one --> 
      
            <attribute name="DefaultTopicJNDIContext">/topic</attribute>
      
      
      
      
                  <attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
      
            <!-- The default Dead Letter Queue (DLQ) to use for destinations.
                 This can be overridden on a per destinatin basis -->
      
            <attribute name="DefaultDLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute>
      
            <!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
                 This can be overridden on a per destinatin basis -->
      
            <attribute name="DefaultMaxDeliveryAttempts">10</attribute>
      
            <!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
      
            <attribute name="DefaultExpiryQueue">jboss.messaging.destination:service=Queue,name=ExpiryQueue</attribute>
      
            <!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
      
            <attribute name="DefaultRedeliveryDelay">10000</attribute>
      
            <!-- The periodicity of the message counter manager enquiring on queues for statistics -->
      
            <attribute name="MessageCounterSamplePeriod">5000</attribute>
      
            <!-- The maximum amount of time for a client to wait for failover to start on the server side after
                 it has detected failure -->
      
            <attribute name="FailoverStartTimeout">60000</attribute>
      
            <!-- The maximum amount of time for a client to wait for failover to complete on the server side after
                 it has detected failure -->
      
            <attribute name="FailoverCompleteTimeout">300000</attribute>
      
      
      
      
            <attribute name="StrictTck">false</attribute>
      
            <!-- The maximum number of days results to maintain in the message counter history -->
      
            <attribute name="DefaultMessageCounterHistoryDayLimit">-1</attribute>
      
            <!-- The name of the connection factory to use for creating connections between nodes to pull messages -->
      
            <attribute name="ClusterPullConnectionFactoryName">jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory</attribute>
      
            <!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
                  by a particular consumer from a particular producer? -->
      
            <attribute name="DefaultPreserveOrdering">false</attribute>
      
            <!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover -->
      
            <attribute name="RecoverDeliveriesTimeout">300000</attribute>
      
            <!-- Set to true to enable message counters that can be viewed via JMX -->
      
            <attribute name="EnableMessageCounters">false</attribute>
      
            <attribute name="SuckerPassword">${queues.database.password}</attribute>
      
            <!-- The name of the server aspects configuration resource
            <attribute name="ServerAopConfig">aop/jboss-aop-messaging-server.xml</attribute>
            -->
            <!-- The name of the client aspects configuration resource
              <attribute name="ClientAopConfig">aop/jboss-aop-messaging-client.xml</attribute>
            -->
      
      
      
      
            <depends optional-attribute-name="PersistenceManager">jboss.messaging:service=PersistenceManager</depends>
      
            <depends optional-attribute-name="JMSUserManager">jboss.messaging:service=JMSUserManager</depends>
      
            <depends>jboss.messaging:service=Connector,transport=bisocket</depends>
            <depends optional-attribute-name="SecurityStore"
                proxy-type="org.jboss.jms.server.SecurityStore">jboss.messaging:service=SecurityStore</depends>
         </mbean>
      
      following is security store conf
      
      
      <bean name="SecurityStore" class="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore">
            <!-- default security configuration -->
            <property name="defaultSecurityConfig">
               <![CDATA[
                  <security>
                     <role name="guest" read="true" write="true" create="true"/>
                  </security>
               ]]>
            </property>
            <property name="suckerPassword">CHANGE ME!!</property>
            <property name="securityDomain">messaging</property>
            <property name="securityManagement"><inject bean="JNDIBasedSecurityManagement"/></property>
            <!-- @JMX annotation to export the management view of this bean -->
            <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.messaging:service=SecurityStore",exposedInterface=org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStoreMBean.class)</annotation>
            <!-- Password Annotation to inject the password from the common password utility
             <annotation>@org.jboss.security.integration.password.Password(securityDomain="messaging",methodName="setSuckerPassword")</annotation>
             -->
         </bean>
      
      
        • 1. Re: Problem upgrading to JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 5.1
          niteshmehta

          OK, I thing I got it.

          Although Code of

          org.jboss.jms.server.ServerPeer

          class look almost similar

           

          But when I compared  /xmdesc/ServerPeer-xmbean.xml file I found that

           

            <attribute access="read-write" getMethod="getSecurityStore" setMethod="setSecurityStore">
                <description>The SecurityStore implementation for the server.</description>
                <name>SecurityStore</name>
           <type>org.jboss.jms.server.SecurityStore</type>
             </attribute>
          

          Does not exist in JBM 1.4.5

          Whereas two new attributes

             <attribute access="read-write" getMethod="getSecurityDomain" setMethod="setSecurityDomain">
           <description>The Security Domain to be used by the Server Peer</description>
           <name>SecurityDomain</name>
           <type>java.lang.String</type>
             </attribute>
          
             <attribute access="read-write" getMethod="getDefaultSecurityConfig" setMethod="setDefaultSecurityConfig">
           <description>The Security config to use when the destination does not supply any</description>
           <name>DefaultSecurityConfig</name>
           <type>org.w3c.dom.Element</type>
             </attribute>
          

          has been added. These two attributes (DefaultSecurityConfig, SecurityDomain ) was part of SecurityStore bean @see SecurityStore bean above.

          I copied these two entries directly into ServerPeer mbean

           

          Now myServerPeer mbean  looks something like

           

          <mbean code="org.jboss.jms.server.ServerPeer"
                name="jboss.messaging:service=ServerPeer"
                xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
          
          
          
          
          
          
          
          
                <!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
          
          
          
          
          
          
          
          
                <attribute name="ServerPeerID">${jboss.messaging.ServerPeerID:0}</attribute>
          
          
                <!-- The default JNDI context to use for queues when they are deployed without specifying one --> 
          
          
                <attribute name="DefaultQueueJNDIContext">/queue</attribute>
          
          
                <!-- The default JNDI context to use for topics when they are deployed without specifying one --> 
          
          
                <attribute name="DefaultTopicJNDIContext">/topic</attribute>
          
          
          
          
          
          
          
          
                      <attribute name="PostOffice">jboss.messaging:service=PostOffice</attribute>
          
          
                <!-- The default Dead Letter Queue (DLQ) to use for destinations.
                     This can be overridden on a per destinatin basis -->
          
          
                <attribute name="DefaultDLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute>
          
          
                <!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
                     This can be overridden on a per destinatin basis -->
          
          
                <attribute name="DefaultMaxDeliveryAttempts">10</attribute>
          
          
                <!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
          
          
                <attribute name="DefaultExpiryQueue">jboss.messaging.destination:service=Queue,name=ExpiryQueue</attribute>
          
          
                <!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
          
          
                <attribute name="DefaultRedeliveryDelay">10000</attribute>
          
          
                <!-- The periodicity of the message counter manager enquiring on queues for statistics -->
          
          
                <attribute name="MessageCounterSamplePeriod">5000</attribute>
          
          
                <!-- The maximum amount of time for a client to wait for failover to start on the server side after
                     it has detected failure -->
          
          
                <attribute name="FailoverStartTimeout">60000</attribute>
          
          
                <!-- The maximum amount of time for a client to wait for failover to complete on the server side after
                     it has detected failure -->
          
          
                <attribute name="FailoverCompleteTimeout">300000</attribute>
          
          
          
          
          
          
          
          
                <attribute name="StrictTck">false</attribute>
          
          
                <!-- The maximum number of days results to maintain in the message counter history -->
          
          
                <attribute name="DefaultMessageCounterHistoryDayLimit">-1</attribute>
          
          
                <!-- The name of the connection factory to use for creating connections between nodes to pull messages -->
          
          
                <attribute name="ClusterPullConnectionFactoryName">jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory</attribute>
          
          
                <!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
                      by a particular consumer from a particular producer? -->
          
          
                <attribute name="DefaultPreserveOrdering">false</attribute>
          
          
                <!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover -->
          
          
                <attribute name="RecoverDeliveriesTimeout">300000</attribute>
          
          
                <!-- Set to true to enable message counters that can be viewed via JMX -->
          
          
                <attribute name="EnableMessageCounters">false</attribute>
          
          
                <attribute name="SuckerPassword">${queues.database.password}</attribute>
            
                    <attribute name="SecurityDomain">messaging</attribute>
                      <attribute name="DefaultSecurityConfig">
                               <![CDATA[
                      <security>
                         <role name="guest" read="true" write="true" create="true"/>
                      </security>
                   ]]>
                      </attribute>
                <!-- The name of the server aspects configuration resource
                <attribute name="ServerAopConfig">aop/jboss-aop-messaging-server.xml</attribute>
                -->
                <!-- The name of the client aspects configuration resource
                  <attribute name="ClientAopConfig">aop/jboss-aop-messaging-client.xml</attribute>
                -->
          
          
          
          
          
          
          
          
                <depends optional-attribute-name="PersistenceManager">jboss.messaging:service=PersistenceManager</depends>
          
          
                <depends optional-attribute-name="JMSUserManager">jboss.messaging:service=JMSUserManager</depends>
          
          
                <depends>jboss.messaging:service=Connector,transport=bisocket</depends>
                <depends>jboss.messaging:service=SecurityStore</depends>
             </mbean>
          
          • 2. Re: Problem upgrading to JBoss Messaging from 1.4.3 to 1.4.5 in JBoss 5.1
            niteshmehta

            I also had to change <attribute name="SecurityDomain">messaging</attribute>

            to

            <attribute name="SecurityDomain">java:/jaas/messaging</attribute>