• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange exception while using JBOSS

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

22:34:06,015 INFO [EJBContainer] STARTED EJB: com.ejb3inaction.actionbazaar.buslogic.ShippingRequestProcessorMDB ejbName: ShippingRequestMessageConsumer
22:34:06,031 WARN [MessagingContainer] Could not find the queue destination-jndi-name=jms/ShippingRequestQueue
22:34:06,031 WARN [MessagingContainer] destination not found: queue/ShippingRequestQueue reason: javax.naming.NameNotFoundException: ShippingRequestQueue not bound
22:34:06,031 WARN [MessagingContainer] creating a new temporary destination: queue/ShippingRequestQueue
22:34:06,046 INFO [ShippingRequestQueue] Bound to JNDI name: queue/ShippingRequestQueue
22:34:06,109 INFO [EJB3Deployer] Deployed: file:/E:/DJ/Certifications/Java/SCBCD/Application Servers/JBOSS/jboss-4.2.3.GA/server/default/tmp/deploy/tmp41092chapter4.ear-contents/chapter4-ejb.jar
22:34:06,171 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1e1153a(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@465863 destination=jms/ShippingRequestQueue isTopic
javax.naming.NameNotFoundException: jms not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.util.naming.Util.lookup(Util.java:215)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:409)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:316)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:635)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:595)
22:34:06,187 INFO [EARDeployer] Started J2EE application: file:/E:/DJ/Certifications/Java/SCBCD/Application Servers/JBOSS/jboss-4.2.3.GA/server/default/deploy/chapter4.ear
22:34:06,328 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
22:34:06,359 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
22:34:06,375 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 40s:32ms
22:34:16,187 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1e1153a(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@465863 destination=jms/ShippingRequestQueue isTopic=f
22:34:16,187 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1e1153a(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@465863 destination=jms/ShippingRequestQueue isTopic=false
javax.naming.NameNotFoundException: jms not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
....

The exception repeats every 10 seconds.



1) How to fix this?
Its very important i get this working otherwise i will not be able to test out things with MDB.

Desperate times calls for desperate measures. My eagarness to fix this one bought me to these statements

22:34:06,015 INFO [EJBContainer] STARTED EJB: com.ejb3inaction.actionbazaar.buslogic.ShippingRequestProcessorMDB ejbName: ShippingRequestMessageConsumer
22:34:06,031 WARN [MessagingContainer] Could not find the queue destination-jndi-name=jms/ShippingRequestQueue
22:34:06,031 WARN [MessagingContainer] destination not found: queue/ShippingRequestQueue reason: javax.naming.NameNotFoundException: ShippingRequestQueue not bound
22:34:06,031 WARN [MessagingContainer] creating a new temporary destination: queue/ShippingRequestQueue
22:34:06,046 INFO [ShippingRequestQueue] Bound to JNDI name: queue/ShippingRequestQueue
22:34:06,109 INFO [EJB3Deployer] Deployed: file:/E:/DJ/Certifications/Java/SCBCD/Application Servers/JBOSS/jboss-4.2.3.GA/server/default/tmp/deploy/tmp41092chapter4.ear-contents/chapter4-ejb.jar
22:34:06,171 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1e1153a(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@465863 destination=jms/ShippingRequestQueue isTopic
javax.naming.NameNotFoundException: jms not bound

I renamed the queue from jms/ShippingRequestQueue to queue/ShippingRequestQueue and now i dont see the exception. It worked
22:43:49,156 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
22:43:49,296 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
22:43:49,312 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 29s:781ms
22:46:07,906 INFO [STDOUT] INSERT INTO SHIPPING_REQUESTS(ITEM, SHIPPING_ADDRESS, SHIPPING_METHOD, INSURANCE_AMOUNT) VALUES ( 10101, '101 Easy Street', ' Snail mail', 101.0)
22:46:07,906 INFO [STDOUT] Shipping request processed.

After changind the name:
22:43:48,765 INFO [EJBContainer] STARTED EJB: com.ejb3inaction.actionbazaar.buslogic.ShippingRequestProcessorMDB ejbName: ShippingRequestMessageConsumer
22:43:48,781 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/ShippingRequestQueue
22:43:48,781 WARN [MessagingContainer] destination not found: queue/ShippingRequestQueue reason: javax.naming.NameNotFoundException: ShippingRequestQueue not bound
22:43:48,781 WARN [MessagingContainer] creating a new temporary destination: queue/ShippingRequestQueue
22:43:48,796 INFO [ShippingRequestQueue] Bound to JNDI name: queue/ShippingRequestQueue


Reeading the statements from JBOSS log
Could not find the queue destination-jndi-name=queue/ShippingRequestQueue
creating a new temporary destination: queue/ShippingRequestQueue

1) Does this mean that EJB Container while starting MDB checks to see if there is a queue with the name specified
as "destination" ActivationConfigProperty exists and if not creates a temperory one?
2) The above point brings me another question, How can one create Desination such as Queue or Topic outside the MDB
as done in above case, so that the EJB container does not have to create one on our behalf?
3) When i changed the name from queue/ShippingRequestQueue to just "ShippingRequestQueue", I again started to see the above
exception javax.naming.NameNotFoundException: ShippingRequestQueue not bound. Does this mean that destination[queue/topic]
must be a specific name or start with specific destinationType ?
[ December 26, 2008: Message edited by: Deepak Jain ]
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please take time and respond this question.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak,

Soory for the delayed response, just came back from vacation.

It appears that you have not deployed the JMS resources. I would take a closer look at the ANT scripts that come with the example code.

Best regards,
Reza
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic