Can't run example (JBoss Messaging 2.1)
tamaluna May 11, 2007 8:04 PMI started a thread in the JBoss Messaging forum (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=108276), and it was suggested that I redirect that to this forum, being that my problem is more of and MDB issue.
As I stated in my original post, I ran the JBoss Messaging installation verbatim from the User's Guide, and was able to run the validation step, and everything seemed groovy.
Then when I went to build my MDB (EJB2.1) and deploy it, I get weird stuff in my server log:
2007-05-10 16:57:21,984 DEBUG [org.jboss.ejb.EJBDeployer.verifier] Bean checked: MDBExample: Verified.
2007-05-10 16:57:22,171 DEBUG [org.jboss.ejb.EJBDeployer] Deploying: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
2007-05-10 16:57:22,171 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:22,171 DEBUG [org.jboss.ejb.EjbModule] Creating jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:24,421 DEBUG [org.jboss.ejb.EjbModule] createService, begin
2007-05-10 16:57:24,421 INFO [org.jboss.ejb.EjbModule] Deploying MDBExample
2007-05-10 16:57:24,515 DEBUG [org.jboss.ejb.EjbModule] Creating WebClassLoader of class org.jboss.web.WebClassLoader
2007-05-10 16:57:24,734 DEBUG [org.jboss.ejb.EjbModule] creating binding for MDBExample:message-driven-bean
2007-05-10 16:57:24,875 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:24,875 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: []
2007-05-10 16:57:24,875 DEBUG [org.jboss.ejb.MessageDrivenContainer] Creating jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:24,968 DEBUG [org.jboss.ejb.MessageDrivenContainer] Mapped onMessage 1175993645 to public void org.jboss.example.jms.queue.MDBExample.onMessage(javax.jms.Message)
2007-05-10 16:57:24,984 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:24,984 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Creating jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:24,984 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Created jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:24,984 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519 dependents are: []
2007-05-10 16:57:25,000 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,000 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Creating jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,015 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Created jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,015 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519 dependents are: []
2007-05-10 16:57:25,015 DEBUG [org.jboss.ejb.MessageDrivenContainer] Created jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:25,015 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB dependents are: []
2007-05-10 16:57:25,015 DEBUG [org.jboss.ejb.EjbModule] Bound jmxName=jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB, hash=-318491534into Registry
2007-05-10 16:57:25,015 DEBUG [org.jboss.ejb.EjbModule] Created jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:25,015 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EjbModule,module=queueMdbTest.jar dependents are: []
2007-05-10 16:57:25,031 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/W:/jboss-4.0.5.new/server/messaging/tmp/aopdynclasses/ucl43199/?dynamic=true, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@1224b90{ url=file:/W:/jboss-4.0.5.new/server/messaging/tmp/deploy/tmp43198queueMdbTest.jar ,addedOrder=39}
2007-05-10 16:57:25,062 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying queueMdbTest.jar
2007-05-10 16:57:25,062 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
2007-05-10 16:57:25,062 DEBUG [org.jboss.ws.integration.jboss.DeployerInterceptorEJB21] start: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.EJBDeployer] start application, deploymentInfo: org.jboss.deployment.DeploymentInfo@789c5318 { url=file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar }
deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
status: Starting
state: START_DEPLOYER
watch: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
altDD: null
lastDeployed: 1178841441359
lastModified: 1178841441281
mbeans:
jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB state: Created
, short name: queueMdbTest.jar, parent short name: null
2007-05-10 16:57:25,062 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.EjbModule] Starting jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.EjbModule] startService, starting container: MDBExample
2007-05-10 16:57:25,062 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.MessageDrivenContainer] Starting jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.MessageDrivenContainer] Begin java:comp/env for EJB: MDBExample
2007-05-10 16:57:25,062 DEBUG [org.jboss.ejb.MessageDrivenContainer] TCL: org.jboss.util.loading.DelegatingClassLoader@cae5b8
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.MessageDrivenContainer] Bound java:comp/ORB for EJB: MDBExample
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.MessageDrivenContainer] Bound java:comp:/HandleDelegate for EJB: MDBExample
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.MessageDrivenContainer] End java:comp/env for EJB: MDBExample
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] MDBExample cannot be Bound, doesn't have local and local home interfaces
2007-05-10 16:57:25,078 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Starting jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.plugins.MessageDrivenInstancePool] Started jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,078 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=local/MDBExample@3888519 dependent components: []
2007-05-10 16:57:25,078 DEBUG [org.jboss.resource.connectionmanager.CachedConnectionInterceptor] start called in CachedConnectionInterceptor
2007-05-10 16:57:25,078 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
2007-05-10 16:57:25,078 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
Then further down I get
2007-05-10 16:57:31,078 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] context: javax.naming.InitialContext@7348e
2007-05-10 16:57:31,078 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] jndiSuffix: MDBExample
2007-05-10 16:57:31,078 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] No message-driven-destination given; using; guessing type
2007-05-10 16:57:31,078 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not determine destination type, defaults to: javax.jms.Topic
2007-05-10 16:57:31,078 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Got destination type Topic for MDBExample
Then further down:
2007-05-10 16:57:31,125 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Using client id: null
2007-05-10 16:57:31,125 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: topic/MDBExample reason: javax.naming.NameNotFoundException: MDBExample not bound
2007-05-10 16:57:31,125 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: topic/MDBExample
Then later:
2007-05-10 16:57:31,343 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)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:720)
...
Then:
2007-05-10 16:57:31,390 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Waiting for reconnect internal 10000ms for MDBExample
2007-05-10 16:57:31,421 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Started jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519
2007-05-10 16:57:31,421 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MDBExample@3888519 dependent components: []
2007-05-10 16:57:31,421 DEBUG [org.jboss.ejb.MessageDrivenContainer] Started jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB
2007-05-10 16:57:31,421 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:jndiName=local/MDBExample@3888519,service=EJB dependent components: []
2007-05-10 16:57:31,421 DEBUG [org.jboss.ejb.EjbModule] Started jboss.j2ee:service=EjbModule,module=queueMdbTest.jar
2007-05-10 16:57:31,421 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:service=EjbModule,module=queueMdbTest.jar dependent components: []
2007-05-10 16:57:31,421 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
2007-05-10 16:57:31,593 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: queueMdbTest.jar
2007-05-10 16:57:31,593 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
2007-05-10 16:57:31,593 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar -> file:/W:/jboss-4.0.5.new/server/messaging/deploy/queueMdbTest.jar
Then it tries to reconnect my MDB every 10 seconds, and always fails.
I modified my jboss.xml from the User's Guide as follows:
<?xml version="1.0"?> <jboss> <enterprise-beans> <message-driven> <ejb-name>MDBExample</ejb-name> <destination-jndi-name>queue/testQueue</destination-jndi-name> </message-driven> </enterprise-beans> </jboss>
but that didn't seem to help.
The MDB I'm using incorporates the same MDBExample as in the User's Guide, only I commented out the response stuff; just write messages to the log file.
When I run the "default" server (JBossMQ, the one that comes stock with JBoss 4.0.5.GA), my MDB runs like a top. So I know that it can read from the queue. I wrote a simple JUnit test that sends a message to the queue, and my MDB receives the message.
With the "messaging" server, I run the validation step again, except that I edited out the part where it retrieves the message from the queue; it only sends. When I ant that, it completes successfully, but when I check my log to see the output I should get if the MDB received the message, I do not see it.
In either case, the jmx-console shows the same stuff for both servers (relevant bits):
JBoss
JMX Agent View scylla
ObjectName Filter (e.g. "jboss:*", "*:service=invoker,*") :
...
jboss.j2ee
* binding=message-driven-bean,jndiName=local/MDBExample@30181678,plugin=invoker,service=EJB
* jndiName=local/MDBExample@30181678,plugin=pool,service=EJB
* jndiName=local/MDBExample@30181678,service=EJB
* module=queueMdbTest.jar,service=EjbModule
* service=ClientDeployer
* service=EARDeployer
...
jboss.management.local
* EJBModule=queueMdbTest.jar,J2EEApplication=null,J2EEServer=Local,j2eeType=MessageDrivenBean,name=MDBExample
...
Can someone help me get to the bottom of this please? I don't mind running this with JBossMQ, but I guess there may be some advantages to running JBoss Messaging, so I'd prefer to use that if I can.
Thanks
Pauly T.