Can't run example (JBoss Messaging 2.1)
tamaluna May 9, 2007 2:40 PMI'm trying to make a MDB using JBoss 4.0.5.GA and JBoss Messaging 2.1. I started with the JBoss Messaging 1.2 User's Guide. First I installed the 2.1 package as per Chapter 4 "Download Software" and Chapter 5 "JBoss Messaging Non-Clustered Installation".
At first, the validation step (5.3 "Installation Validation) failed due to some weird server behavior, so I reinstalled JBoss (to a different directory, with new JBOSS_HOME environment var). Repeated installation steps (Ch. 5), and everything worked smoothly.
My next step was to create the MDB, as per Chapter 7.4 "Using EJB2.1 Message Driven Beans". I built my MDBExample.class and jar'd it up with my META-INF (with ejb-jar.xml and jboss.xml), and dropped it into my "messaging" server.
The first time I tried this, it failed with the following message:
org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
So I modified it as follows:
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> <display-name>MDBExampleJAR</display-name> <enterprise-beans> <message-driven> <ejb-name>MDBExample</ejb-name> <ejb-class>org.jboss.example.jms.queue.MDBExample</ejb-class> <transaction-type>Container</transaction-type> </message-driven> </enterprise-beans> </ejb-jar>
When I ran it, I encountered the following error:
WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected for MDBExample
org.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
etc...
I scoured the interweb for solutions to this, but no one seems to have the answer. Isn't this supposed to work "right out of the box"? Or is there something else I'm supposed to set up. Please advise.
TIA
Pauly T.