JMS error when switching persistence back-end in JBoss EAP 5

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.0.0.GA
    • 5.1.0
    • 5.1.1
    • 5.1.2
    • Note: without EAP 5.0.1
  • JBoss Messaging
  • non-clustered server profile based on "default" profile

Issue

After switching JBoss Messaging persisitence back-end from default database (hsqldb) to another vendor database, the following dependency errors occur on server startup.

ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
    Dependency "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" (should be in state "Create", but is actually in state "Configured")
    Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
  Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
    Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
  Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
    Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
  Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
    Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
  Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
    Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
  Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
    Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **")

DEPLOYMENTS IN ERROR:
  Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **

Resolution

There are three options to resolve the issue.

1) Copy the followings from all profile to your profile

  • copy $JBOSS_HOME/server/all/deploy/cluster/jgroups-channelfactory.sar to $JBOSS_HOME/server/$PROFILE/deploy
  • copy $JBOSS_HOME/server/all/lib/jgroups.jar to $JBOSS_HOME/server/$PROFILE/lib

2) Remove the following setting from $JBOSS_HOME/server/$PROFILE/deploy/messaging/*-persistence-service.xml

        <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>

3) Change the following setting in $JBOSS_HOME/server/$PROFILE/deploy/messaging/*-persistence-service.xml

from:

        <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>

to:

        <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>

Root Cause

As in JBoss EAP 4.3 every non-default *-persistence-service.xml in JBoss EAP 5 is pre-configured with cluster channels. However, in JBoss EAP 5 the clustering configuration isn't repeated across each *-persistence-service.xml file. Rather it is defined centrally by the "jboss.jgroups:service=ChannelFactory" MBean in $JBOSS_HOME/server/$PROFILE/deploy/cluster/jgroups-channelfactory.sar.

However, if the "Clustered" attribute for the "jboss.messaging:service=PostOffice" MBean in $JBOSS_HOME/server/<profile>/deploy/messaging/*-persistence-service.xml is "false" then the "ChannelFactoryName," "ControlChannelName," "DataChannelName," and "ChannelPartitionName" are all ignored so the dependency on "jboss.jgroups:service=ChannelFactory" can be removed.

Diagnostic Steps

Steps to reproduce this issue:

  • Copy mysql-ds.xml to from $JBOSS_HOME/docs/examples/jca to $JBOSS_HOME/server/default/deploy and configure it with the appropriate <connection-url>, <user-name> and <password> to your environment.
  • Copy the MySQL driver to $JBOSS_HOME/server/default/lib.
  • Change the <jndi-name> of $JBOSS_HOME/server/default/deploy/mysql-ds.xml to DefaultDS.
  • Remove $JBOSS_HOME/server/default/deploy/hsqldb-ds.xml
  • Replace the existing $JBOSS_HOME/server/default/deploy/messaging/*-persistence-service.xml with $JBOSS_HOME/docs/examples/jms/mysql-persistence-service.xml.
  • Start JBoss $JBOSS_HOME/bin/run.sh -c default
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.